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 within JSON 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 store JSON data. Such data can also be stored as text, but the json data type has the advantage of checking that each stored value is a valid JSON value.

RFC 7159 permits JSON strings to contain Unicode escape sequences denoted by \uXXXX. In the input function for the json 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.