You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use the content type application/json for atomic values, maps, and arrays, but that's kind of a lie. What we really have are XDM atomic values, maps, and arrays which support more data types than JSON. What is this pipeline supposed to produce? My naive implementation of casting from JSON to XML serializes the JSON then calls fn:json-to-xml. The result is:
I guess that's the right answer. There's no where in the XML vocabulary to hang additional information about the fact that some of those keys are QNames or that the value of one of the keys is XML.
But it's not very satisfying if you've got, for example, document properties that have QName keys and you want to turn them into XML.
I wonder if we should think about defining some other JSON-to-XML casting in V.next?
And I wonder if we should add a note to the current spec about this lossy transformation.
The text was updated successfully, but these errors were encountered:
Consider this pipeline:
We use the content type
application/json
for atomic values, maps, and arrays, but that's kind of a lie. What we really have are XDM atomic values, maps, and arrays which support more data types than JSON. What is this pipeline supposed to produce? My naive implementation of casting from JSON to XML serializes the JSON then callsfn:json-to-xml
. The result is:I guess that's the right answer. There's no where in the XML vocabulary to hang additional information about the fact that some of those keys are QNames or that the value of one of the keys is XML.
But it's not very satisfying if you've got, for example, document properties that have QName keys and you want to turn them into XML.
I wonder if we should think about defining some other JSON-to-XML casting in V.next?
And I wonder if we should add a note to the current spec about this lossy transformation.
The text was updated successfully, but these errors were encountered: