JSONParse

Qubes 6.5 Interprets a string in JSON format.

Syntax

JSONParse(string)
string = JSON string you want to interpret

Remarks

When processing JSON data in an XForms, it is usually preferable to use the newer JSONPath.

The function generates a list of elements, extracted from a JSON string containing an array of immediate values (numerical, strings, and Booleans).

For backward compatibility, arrays of unidimensional arrays of immediate values are also supported, but iteratively.
In other words, an array of arrays will be returned as a list of strings, with each string being the sub-array in JSON format.
Ex :
JSONparse('[ [ 1, "toto", true ] , [ 2, "titi" ] ]') = List( '[ 1, "toto", true ]' , '[ 2, "titi" ]' )

Examples

JSONParse("123") = 123
JSONparse('["hello","world"]') = List("hello", "world")

Classification

Strings Transcoding