-----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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQGUBAEBAgAGBQJU5KfiAAoJEADcfz7u4AZj3jYLwJEpVwIZnKpcGEXXAeEg4DqO isWmSVI4pn9+wnlPGTtQuarHkRklIkapET9TkL8b76NXB83pFCiExgGIqeVIVZeO RAiGgj018/F5DaTSWFg0EG1uptxwBbUWkzKpIfa9HgfbgybChPTw8q2acxYDrJ0B q6jJ29xet/EvPfbjsavAuvq+Gv6HDJtum8WZ7Ex2kA7PAVUQSo5w8Y9qtqqmEVWp tGXgAjQrZCmeYkTcWZ2tJ9T/K4yBlyzleA5uX5GUJW6iCuHEZ4QgAqtUQNswgJIg h9+wQhU/R1/NlyYBelrhGKCUFLoUjdToYfJEGKPEcYd3+IDcyPfMxmAAdMoBoCg4 K+1UgdACn8xxeyYvQEKxn832UrgYhdowjEQsjXWLcWI2Mwe1F2tgAnev5SXjpbti X/zrxLzh5sUhUuj74el4VaMDWheKdTqTmxTtgJzZb/59o//TI70Bg1L5fdn2o2yS hqyp8X/tLkKbOWxLvFmFCXDv5Ls717A= =7M1F -----END PGP SIGNATURE-----