This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Currently XSLT 3.0 has two functions for handling JSON: 1. http://www.w3.org/TR/xslt-30/#func-xml-to-json 2. http://www.w3.org/TR/xslt-30/#func-json-to-xml These functions have broader applications beyond XSLT and deserve to be made available to all XPath-based languages, including XQuery. Please consider this request to move these two functions into XPath Functions and Operators 3.1.
The XQuery WG looked briefly at this in the XML Prague meeting and was broadly sympathetic, but decided to "sleep on it" before making a final decision. Although adding new functions at this stage of specification development would not normally be countenanced, there was a feeling that moving them from one spec to another, when the specs have a similar level of maturity, would be considered acceptable. We have already started work on converting the existing test material for these functions, in the hope of a positive decision.
Thank you, Michael and WG!
At the teleconference on 2015-03-03, the joint Working Group agreed to fix this bug by including the functions xml-to-json and json-to-xml in F and O, at the same time changing the namespace used by the XML representation to the new namespace: http://www.w3.org/2005/xpath-functions/json. Joe, many thanks for bringing this to our attention. Please could you acknowledge your acceptance of the resolution by closing this bug.
For the record, I also changed the error codes returned by these two functions to align with F+O conventions, and I made editorial changes to describe the relationship of these functions to the existing JSON functions in F+O (for example, deleting the text that denied the existence of JSON-to-XML mapping functions...) The schema for the new namespace will appear in an appendix and in a free-standing document. I will also move the schema for fn:analyze-string to the same appendix.
Belatedly, many thanks to Michael, Andrew, and the WG. Somehow, regrettably, I missed your replies when they came. I'm grateful that you considered and accepted this request.