[MarkLogic Dev General] question about json in marklogic 4

helen chen hchen at aip.org
Tue Apr 20 09:32:09 PDT 2010


Does marklogic 4 has API that can convert xml node to json format string? 

I tried xdmp:to-json() function, it seems that it only wrap the xml node with double quote, didn't convert the xml node to json format.

like:
let $a := <a><b>test</b></a>
return xdmp:to-json($a)

I got result   "<a><b>test</b></a>"


Did I miss anything? Or does that mean I have to convert the xml to a xquery map and then call the function?

Helen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20100420/90d30bd4/attachment.html


More information about the General mailing list