JSON v JSONB: A Dive into PostgreSQL
Friday, March 22, 2019JSON, or JavaScript Object Notation, is a lightweight data interchange format that is easy for both computers and humans to deal with. The rules are pretty simple:
- a JSON document is an
object - an
objectconsists of akeyand avalue - a
keyis astring - a
valuecan be astring,number,boolean,array,objectornull
So, when dealing with data, JSON has become fairly popular: it's the default document storage type for databases like CouchDB and MongoDB (though MongoDB technically uses a JSON-like format), and available in PostgreSQL as the JSON and JSONB data types.