XML representation of JSON data
If the HTTP request returns JSON data, the data provider converts the data to XML.
The data provider converts the name of a JSON attribute to the element name. For a JSON
attribute of a simple type, it converts the value to text data within the element. Embedded JSON
objects are converted to embedded XML elements. Any subordinate attributes are converted to
subordinate elements.
The root XML element is JSON_document.
If a JSON
attribute name contains characters that are invalid in an element name, the data provider modifies
it to produce a valid element name. The data provider also adds a JSON_name
attribute to the element. The value of the attribute is the original JSON attribute name.
For
every element of a JSON array, the data provider creates a
JSON_xxx_array_element XML element, where xxx
is the name of the array. The value of the array element is converted into text within the XML
element. A JSON_index attribute is added to each XML element; the value of the
attribute is the index of the array element within the array.
The data provider adds the
following attributes to every element:
JSON_level: the level of the node within the JSON file. The root of the tree, represented by theJSON_documenttag, is level 1.JSON_type: the type of the JSON node (object, array, string, or number).