January 2019
Beginner
556 pages
14h 19m
English
PostgreSQL supports two JSON data types, JSON and JSONB, both of which are implementations of RFC 7159. Both types can be used to enforce JSON rules. Both types are almost identical. However, JSONB is more efficient, as it stores JSON documents in a binary format and also supports indexes. JSONB is the successor of JSON. It was introduced in PostgreSQL 9.4.
When using JSON, it's preferable to have UTF-8 as the database encoding to ensure that the JSON type conforms to RFC 7159 standards. On the one hand, when storing data as a JSON document, the JSON object is stored in a textual format. On the other hand, when storing a JSON object as JSONB, the JSON primitive data types, mainly string, Boolean, and number, ...
Read now
Unlock full access