Hi,

IS JSON is documented as:

expression IS [ NOT ] JSON
  [ { VALUE | SCALAR | ARRAY | OBJECT } ]
  [ { WITH | WITHOUT } UNIQUE [ KEYS ] ]

which is fine but 'VALUE' is nowhere mentioned
(except in the commit-message as: IS JSON [VALUE] )

Unless I'm mistaken 'VALUE' does indeed not change an IS JSON statement, so to document we could simply insert this line (as in the attached):

"The VALUE key word is optional noise."

Somewhere in its text in func.sgml, which is now:

"This predicate tests whether expression can be parsed as JSON, possibly of a specified type. If SCALAR or ARRAY or OBJECT is specified, the test is whether or not the JSON is of that particular type. If WITH UNIQUE KEYS is specified, then any object in the expression is also tested to see if it has duplicate keys."


Erik Rijkers
--- doc/src/sgml/func.sgml.orig 2023-04-12 06:16:40.517722315 +0200
+++ doc/src/sgml/func.sgml      2023-04-12 06:30:56.410837805 +0200
@@ -16037,6 +16037,7 @@
        <para>
         This predicate tests whether <replaceable>expression</replaceable> can 
be
         parsed as JSON, possibly of a specified type.
+        The <literal>VALUE</literal> key word is optional noise.
         If <literal>SCALAR</literal> or <literal>ARRAY</literal> or
         <literal>OBJECT</literal> is specified, the
         test is whether or not the JSON is of that particular type. If

Reply via email to