Loading TOC...


   arg as String
) as Sequence


Parses a string as JSON, returning an item sequence.

arg JSON input to be parsed.

Usage Notes

A JSON object or string is parsed as a json:object.

The JSON null value is represented as the empty sequence, and serializes in a way that indicates it is a null value. Therefore, when the null value is returned to JSON via xdmp:to-json, the null value is preserved.

Nested arrays in JSON are turned into nested sets of json:arrays.

Any codepoints in the JSON string that aren't allowed in XML are rejected and an error is thrown.


xdmp.fromJsonString('["a", null, false]');

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.