curl -H"Accept:application/json" "http://localhost:8984/all-documents.json"
This now returns the XML version of func() - however now JSON serialized response although %output:method("json") is specified!?
Since Version 8.0, BaseX follows the XQuery 3.1 serialization rules, which serializes arbitrary XML nodes as JSON string [1]. There's one exception, though: BaseX XML representations of JSON documents will continue to be converted from nodes to JSON maps or arrays [2].
What was your server-side output, and what result did you expect?
[1] http://www.w3.org/TR/xslt-xquery-serialization-31/#json-output [2] http://docs.basex.org/wiki/XQuery_3.1#JSON_Serialization
Andreas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQGUBAEBAgAGBQJU5Io0AAoJEADcfz7u4AZj5FkLwMvw1psFIBb/JQV4q09Szasz GGa4C8TBqAc4aeYje9Bqv55rgmJL7zjDaqjKUgrgnT3mvoVwKwz6URm6pgrg2S82 fF3fw2taGnwnA2Np7eEJgaW5Lu7hByBGa+l4yGEW39s1SVgvkVnmSXrw+Cn84fpi F3XwtRdoD9nH3T9aTY3vTUs2ZqHD7oTrg8kgi57IDAxuG10WQpsZ6jsxwFgsS0Db sjgnFfg1/eLQyP9aIi12519bhoKzLnyl7GqyYoi0dgSy7ncu/2SyUQ1u8pVdEt7t gFOxC9cS/tuqYH4oQwcqXqoCNU961f/I/jdaMSeuaNzZaSn6bHLzuhkReddAJtwE RQ67XkTqXIayTFtjZP6u73Hrw/HI0NBThuug0ZwwEAiXEw9PsFDq8RWX8tFJR85m QDyAvOGXgzI/Z/9u4Zjfn2otetiCG1qSybaPD0p9P9ZA9jamSdXSeGw7GhZPLUjb MK8jRejjEQxeKr1miwCLYQGRjSxXaJQ= =iDiq -----END PGP SIGNATURE-----