json
- json
-
The
json
data type stores an exact copy of the input text, which must be reparsed on each execution. Because of that,json
preserves semantically-insignificant white space between tokens, as well as the order of keys withinJSON
objects.If a
JSON
object within the value contains the same key more than once, all the key/value pairs are kept. (The processing functions consider the last value as the operative one.)The
json
data type can be used to storeJSON
data. Such data can also be stored as text, but thejson
data type has the advantage of checking that each stored value is a validJSON
value.RFC 7159 permits
JSON
strings to contain Unicode escape sequences denoted by\uXXXX
. In the input function for thejson
type, Unicode escapes are allowed regardless of the database encoding, and are checked only for syntactic correctness (four hex digits must follow \u).No more than 1
json
column in a table is permitted.