TO_JSON
Converts a value to a JSON document.
With indent 0 the document is one line. If value is a single variable with a json tag, the value is placed at the path of the tag. indent outside 0 to 16 raises INVALID_ARGUMENT.
Parameters and results
valueany type: the value to convertindentINTEGER: spaces per level, 0 to 16 (optional, default 0)- result
resultSTRING: the JSON document
Example
c0de
CALL c0de/strings/TO_JSON
PARAMETER value config ;
PARAMETER indent 2 ;
RESULT result json