I'm having a difficult time understanding what good the json:object()
function is. From what I can tell after using it, it is a specialized
map:map object. I have tried using json:transform-to-json on the object but
the transform function doesn't like that.
So, what is the proper way to create a json:object and receive back the
actual JSON string?
For example:
let $json-obj := json:object()
let $_ := map:put($json-obj, "key", "value")
return magic-function($json-obj) which would return {"key": "value"}
What I get instead by calling json:transform-to-json($json-obj) is an
invalid coercion error. Even wrapping the object and passing the node
doesn't work.
Any ideas? Has anyone actually used this function? From the comments in the
documentation it doesn't have many comments. (
http://docs.marklogic.com/json:transform-to-json)
--
Steve
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general