type

JSONB

PostgreSQL JSONB uses a decomposed representation; whitespace and duplicate object keys are not preserved. It supports indexing strategies specific to JSONB. Example target: PostgreSQL 17. Run in a disposable database; examples need no existing tables.

Formal Syntax & Structure

sql syntaxsql
JSONB

Working Example

Example Snippetsql
SELECT CAST('{"x":1,"x":2}' AS JSONB)->>'x';
SQL Reference