Note: Many of these functions and operators will convert Unicode escapes in the JSON text to the appropriate UTF8 character when the database encoding is UTF8. In other encodings the escape sequence must be for an ASCII character, and any other code point in a Unicode escape sequence will result in an error. In general, it is best to avoid mixing Unicode escapes in JSON with a non-UTF8 database encoding, if possible.
Note: The hstore extension has a cast from hstore to json, so that converted hstore values are represented as JSON objects, not as string values.
See also Section 9.20 about the aggregate function json_agg which aggregates record values as JSON efficiently.