SAP NetWeaver AS ABAP Release 750, ©Copyright 2016 SAP AG. All rights reserved.
ABAP - Keyword Documentation → ABAP - Reference → Data Interfaces and Communication Interfaces → ABAP and JSON →JSON-XML - XML Representation of JSON
JSON XML is an SAP-specific representation of JSON data in XML format. The single values, arrays, and objects in JSON are represented as followed in XML.
Single Values
Character-like values
Number values
Boolean values
Null values
Data Structures
Arrays
The components of arrays, separated by commas, are mapped as subelements of the element <array>, but the type-specific mapping rule applies to each element.
Note
Since the components of an array do not have names, the elements of an array in JSON-XML cannot have the corresponding attributes (unlike the case with objects).
Objects
The components of objects, separated by commas, are mapped as subelements of the element <object>. There are two representation methods:
In the shorter method, used by default, a component is mapped like an element of an array, with the name n added to the type-specific XML element of the component as the content of the attribute name.
In the second longer method, the type-specific XML element of a component is nested in an additional element <member>, which then has the attribute name with the name of the component.
Notes
Examples