---
title: "Understanding the new JSON capabilities in Postgres 16"
description: "Postgres 16 expands SQL/JSON syntax with JSON_ARRAY(), JSON_ARRAYAGG() and the IS JSON predicate, each shown with runnable examples."
url: "https://swe.quest/articles/understanding-the-new-json-capabilities-in-postgres-16-72256e4ab11a87d0"
canonical: "https://neon.com/blog/json-features-pg-16"
source: "Neon"
published: "2023-09-18"
difficulty: "medium"
kind: "How-to"
reading_minutes: 3
tags: ["postgres","sql"]
---

# Understanding the new JSON capabilities in Postgres 16

A post on [Neon](https://swe.quest/sources/neon.md), published 2023-09-18, 3 min read, How-to. Original: [https://neon.com/blog/json-features-pg-16](https://neon.com/blog/json-features-pg-16)

## Summary

Postgres 16 expands SQL/JSON syntax with JSON\_ARRAY(), JSON\_ARRAYAGG() and the IS JSON predicate, each shown with runnable examples. JSON\_ARRAY builds an array from a list of values or from a subquery result. JSON\_ARRAYAGG aggregates column values across rows into a single array and skips NULLs. IS JSON tests whether text parses as JSON and can check for a specific type (SCALAR, OBJECT, ARRAY) or for unique keys. Neon now supports Postgres 16, so these features can be tried there.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [SQL](https://swe.quest/tags/sql.md) (Languages)

## Prerequisites

- SQL basics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- JSON

## Keywords

PostgreSQL 16, SQL/JSON, JSON\_ARRAY, JSON\_ARRAYAGG, IS JSON, Neon

## Related posts

- [SQL or NoSQL? Why not use both (with PostgreSQL)?](https://swe.quest/articles/sql-or-nosql-why-not-use-both-with-postgresql-98c239e2ff7e761c.md): Supabase · 2022-11-24 · Medium · 12 min read · PostgreSQL, SQL, Databases
  PostgreSQL's JSONB columns let an app store nested, variable-length data (here, a daily food, water and exercise log) as a single row instead of spreading it across several normalized tables, while keeping SQL available for analysis.
- [What's New in PostgreSQL 14?](https://swe.quest/articles/what-s-new-in-postgresql-14-d679a59b3961e203.md): Render · 2021-10-05 · Medium · 4 min read · PostgreSQL, SQL
  PostgreSQL 14 adds jsonb subscripting, which lets queries read, filter and update nested JSONB values with JavaScript-like bracket syntax instead of path operators such as #\>.
- [Top 3 features in Postgres 17](https://swe.quest/articles/top-3-features-in-postgres-17-b0d086972cf3cc60.md): Neon · 2024-08-30 · Medium · 5 min read · PostgreSQL, SQL
  Postgres 17 adds RETURNING support to MERGE (with a merge\_action() function that reports whether each row was inserted, updated or deleted), SQL/JSON functions including JSON\_TABLE for turning JSON into relational rows, and performance work.
- [pg\_jsonschema: JSON Schema support for Postgres](https://swe.quest/articles/pg-jsonschema-json-schema-support-for-postgres-489ffe5b7545ddca.md): Supabase · 2022-08-19 · Medium · 4 min read · PostgreSQL, Databases
  pg\_jsonschema is a Postgres extension that validates \`json\` and \`jsonb\` values against a JSON Schema through two functions, \`json\_matches\_schema\` and \`jsonb\_matches\_schema\`.
- [pg\_graphql: Postgres functions now supported](https://swe.quest/articles/pg-graphql-postgres-functions-now-supported-279553dc083ab4d8.md): Supabase · 2023-12-12 · Medium · 4 min read · GraphQL, PostgreSQL, API design
  pg\_graphql 1.4+ reflects Postgres user-defined functions into the GraphQL schema, giving custom SQL logic a GraphQL entry point.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
