serialize-json-ext(InputSequenceas items()*) as xs:stringXP3.1XQ3.1
This function takes a sequence of items (of any type), serializes the items in JSON format, and returns the serialized JSON text as a string. The JSON string is constructed in such a way that type information (in the form of special characters) is inserted in the key part of key–value (see example below). These values are of significance only internally, and are used to restore the original input sequence from the JSON string. To convert the JSON string back to the original sequence of items, use the parse-json-ext function.