The following query: import module namespace json = "http://www.zorba-xquery.com/modules/converters/json";
let $json := '{ "action": "GET /html/index", "public": true, "opt": [1, 2, {"foo": "bar"}, null, false, true]}' let $json := json:parse($json) return json:serialize($json)
Returns: JSON serialization error [zerr:ZJSE0005]: "item": illegal child element of "object" type; must be "pair"
The following query: www.zorba- xquery. com/modules/ converters/ json";
import module namespace json = "http://
let $json := '{ "action": "GET /html/index", "public": true, "opt": [1, 2, {"foo": "bar"}, null, false, true]}' $json)
let $json := json:parse($json)
return json:serialize(
Returns:
JSON serialization error [zerr:ZJSE0005]: "item": illegal child element of "object" type; must be "pair"