Documentation for `string(JSON ...)` is unclear on optionality of `<member|index>` parameters
The string(JSON ...)
functions, in my testing, will act on the top level element when no <member|index>
is specified, yet the documentation does not make it clear that specifying a <member|index>
is optional. To me it looks like it requires 1 or more of them, but really it requires 0 or more. Thus I propose the following changes:
...and the
<out-var>
will be set to<member|index>-[<member|index>...]-NOTFOUND
with the path elements up to the point where the error occurred...
should be changed to
...and the
<out-var>
will be set to[<member|index>-[<member|index>-...]]NOTFOUND
with the path elements up to the point where the error occurred...
(since for example string(JSON LENGTH_RESULT ERROR_VARIABLE ERROR_RESULT LENGTH "")
will return NOTFOUND in LENGTH_RESULT and string(JSON LENGTH_RESULT ERROR_VARIABLE ERROR_RESULT LENGTH "{}" Testing)
will return Testing-NOTFOUND in LENGTH_RESULT),
and in each of the string(JSON ...)
function headers, e.g. string(JSON <out-var> [ERROR_VARIABLE <error-variable>] GET <json-string> <member|index> [<member|index> ...])
,
<member|index> [<member|index> ...]
should be changed to
[<member|index> [<member|index> ...]]