-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Christian GrĂ¼n wrote:
The result is XML-ish, try yourself:
curl -H"Accept:application/json" http://dev1.veit-schiele.de:8984/all-documents.json
My expectation is receiving a JSON string.
This is how the XQuery spec wants it to be. If you look closely, you will see that your result starts and end with double quotes.
The problem is that it's not possible to define a lossless bidirectional mapping for XML and JSON resources. In BaseX, one way out is to use the 'jsonml' serialization format [1,2]. It can be triggered by the following annotation:
%output:json("format=jsonml")
This was the missing link for moving a script from exist-db to BaseX. A more complete example in the docs would be helpful here.
Thanks for your patience.
Andreas