Просмотр исходного кода

Help: JSON argument should be quoted

The error that results from a semicolon anywhere in a JSON string
is not obvious.

Issue: #26628
scivision 11 месяцев назад
Родитель
Сommit
7be01178a0
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      Help/command/string.rst

+ 4 - 0
Help/command/string.rst

@@ -523,6 +523,10 @@ Functionality for querying a JSON string.
   option is not present, a fatal error message is generated.  If no error
   option is not present, a fatal error message is generated.  If no error
   occurs, the ``<error-variable>`` will be set to ``NOTFOUND``.
   occurs, the ``<error-variable>`` will be set to ``NOTFOUND``.
 
 
+In the following subcommands, the ``<json-string>`` argument should
+be written as a :ref:`Quoted Argument` to ensure the entire JSON
+string is passed as a single argument even if it contains semicolons.
+
 .. signature::
 .. signature::
   string(JSON <out-var> [ERROR_VARIABLE <error-variable>]
   string(JSON <out-var> [ERROR_VARIABLE <error-variable>]
          GET <json-string> <member|index> [<member|index> ...])
          GET <json-string> <member|index> [<member|index> ...])