Contents
jsonb_pretty()
A function for converting jsonb to formatted text
jsonb_pretty()
is a system function for converting jsonb values to formatted and indented text.
jsonb_pretty()
was added in PostgreSQL 9.5.
Examples
Basic usage example for jsonb_pretty()
:
postgres=# SELECT jsonb_pretty('{"a":"foo", "b":{"bar":"baz"}}'); jsonb_pretty ---------------------- { + "a": "foo", + "b": { + "bar": "baz"+ } + } (1 row)
References
- PostgreSQL documentation: JSON Processing Functions