From: Markus K. <mar...@bs...> - 2011-04-07 12:30:00
|
hy list, I need the following JSON format which should be transformed from an xml structure created by XQuery: [ { "id": "id1", "label": "label1", "value": "value1" }, { "id": "id2", "label": "label2", "value": "value2" } ] I was following the instructions on http://atomic.exist-db.org/blogs/eXist/JSONSerializer but I still cant produce a structure like that. The closest I get is [{ "child1" : { "id" : "id1", "value" : "value1", "label" : "label1"} , "child2" : { "id" : "id2", "value" : "value2", "label" : "label2"} } ] but thats still not correct because of the unnecessary curly brackets and the 'childX' component. I have tried solving the problem experimenting with both json:value and json:array="true|false" but couldnt get it to work. I am currently on eXist_1.4.1dev-rev13702. Am I doing something wrong here or does this not work (yet)? TIA for your help! Cheers, Markus |