In Bug# 11636 [1] ChandraKumar complained that we documented fairly explicitly how to write json boolean true and false but not json null. While repeating the entire RFC in our docs isn't desirable its seems worth considering making the comments on the existing table consistently cover quoting and letter-case rules for the four primitive types shown. Thus the attached.
David J. [1] https://www.postgresql.org/message-id/CAHyU1EYRYCV8gELrBYm6V8E%2BToqf%3DKQe370bPt4yrE_Y1yDZ9w%40mail.gmail.com
commit e009aab5ad4cb7852fec91d759aef3f356542a5e Author: David G. Johnston <david.g.johnston@gmail.com> Date: Wed Sep 30 02:46:26 2020 +0000 Don't make reader view RFC for scalar json value syntax diff --git a/doc/src/sgml/json.sgml b/doc/src/sgml/json.sgml index c0a6554d4d..d727ffc669 100644 --- a/doc/src/sgml/json.sgml +++ b/doc/src/sgml/json.sgml @@ -147,22 +147,22 @@ <entry><type>string</type></entry> <entry><type>text</type></entry> <entry><literal>\u0000</literal> is disallowed, as are Unicode escapes - representing characters not available in the database encoding</entry> + representing characters not available in the database encoding. JSON values are double-quoted.</entry> </row> <row> <entry><type>number</type></entry> <entry><type>numeric</type></entry> - <entry><literal>NaN</literal> and <literal>infinity</literal> values are disallowed</entry> + <entry><literal>NaN</literal> and <literal>infinity</literal> values are disallowed. JSON values are unquoted.</entry> </row> <row> <entry><type>boolean</type></entry> <entry><type>boolean</type></entry> - <entry>Only lowercase <literal>true</literal> and <literal>false</literal> spellings are accepted</entry> + <entry>Only unquoted lowercase <literal>true</literal> and <literal>false</literal> spellings are accepted</entry> </row> <row> <entry><type>null</type></entry> <entry>(none)</entry> - <entry>SQL <literal>NULL</literal> is a different concept</entry> + <entry>SQL <literal>NULL</literal> is a different concept. Must be written lowercase and unquoted.</entry> </row> </tbody> </tgroup>