diff --git a/doc/src/sgml/json.sgml b/doc/src/sgml/json.sgml index c4223fafb6..dfcd025efb 100644 --- a/doc/src/sgml/json.sgml +++ b/doc/src/sgml/json.sgml @@ -13,8 +13,9 @@ JSON data types are for storing JSON (JavaScript Object Notation) - data, as specified in RFC - 7159. Such data can also be stored as text, but + data, as specified in RFC + 8259, which supercedes the earlier RFC 7159. + Such data can also be stored as text, but the JSON data types have the advantage of enforcing that each stored value is valid according to the JSON rules. There are also assorted JSON-specific functions and operators available for data stored @@ -61,7 +62,7 @@ - RFC 7159 specifies that JSON strings should be encoded in UTF8. + RFC 8259 specifies that JSON strings should be encoded in UTF8. It is therefore not possible for the JSON types to conform rigidly to the JSON specification unless the database encoding is UTF8. Attempts to directly include characters that @@ -71,7 +72,7 @@ - RFC 7159 permits JSON strings to contain Unicode escape sequences + RFC 8259 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 @@ -103,7 +104,7 @@ When converting textual JSON input into jsonb, the primitive - types described by RFC 7159 are effectively mapped onto + types described by RFC 8259 are effectively mapped onto native PostgreSQL types, as shown in . Therefore, there are some minor additional constraints on what @@ -113,11 +114,11 @@ Notably, jsonb will reject numbers that are outside the range of the PostgreSQL numeric data type, while json will not. Such implementation-defined - restrictions are permitted by RFC 7159. However, in + restrictions are permitted by RFC 8259. However, in practice such problems are far more likely to occur in other implementations, as it is common to represent JSON's number primitive type as IEEE 754 double precision floating point - (which RFC 7159 explicitly anticipates and allows for). + (which RFC 8259 explicitly anticipates and allows for). When using JSON as an interchange format with such systems, the danger of losing numeric precision compared to data originally stored by PostgreSQL should be considered. @@ -172,7 +173,7 @@ JSON Input and Output Syntax The input/output syntax for the JSON data types is as specified in - RFC 7159. + RFC 8259. The following are all valid json (or jsonb) expressions: