JSON

the usual

JSON

JSON vs JSONB

JSON

JSONB

stores data in text format

stores data in binary format

stores data AS-is

trims of white spaces

slower in operations

fASter in operations

doesn't support full text indexing

supports full text indexing

SELECT '{
    "title":"book 1"}
'::json;

         json          
-----------------------
 {                    +
     "title":"book 1"}+

(1 row)


SELECT '
  {"title":"book 1"}
  '::jsonb


        jsonb        
---------------------
 {"title": "book 1"}
(1 row)

Operations

ROW_TO_JSON()

JSON_AGG()

JSON_BUILD

Json Functions

Existence Operators

Searching JSON

Last updated

Was this helpful?