SerializeJSONExt-Altova Agrandir/Réduire tout Imprimer cette rubrique Un niveau supérieur

Accueil > 


Click to expand/collapseserialize-json-ext

serialize-json-ext(InputSequence as items()*) as xs:string     XP3.1 XQ3.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.

serialize-json-ext(("testval", 12345, xs:date("2018-10-10"), xs:boolean("1"))) returns '{"✔❸":[{"✔➃":"testval"},{"✔➊":"12345"},{"✔➜":"2018-10-10"},{"✔➘":"true"}]}'



© 2019 Altova GmbH