SAP ABAP JSON TRAFO ID



Get Example source ABAP code based on a different SAP table
  



ABAP_JSON - Identity Transformation
The predefined identity transformation ID is executed internally so that all requirements for JSON transformations are met. The following combinations are possible:
JSON writer as XML target
ABAP data objects as source
The ABAP data is serialized directly to its canonical JSON format asJSON. In this concept, the ABAP data is serialized first to its canonical XML format asXML . This is then transformed to an asJSON-XML representation and passed to the writer.
XML data as XML source
The XML source must be in JSON-XML format and is passed to the writer directly.
JSON data or JSON reader as XML source
The JSON-XML data is passed to the writer directly.
JSON data or JSON reader as XML source
ABAP data objects as target
The JSON data must be in an asJSON format that matches the ABAP data objects. The JSON data is deserialized directly to the ABAP data objects. Conceptually, an asJSON-XML representation of the asJSON data is processed that is first transformed to asXML and then deserialized to the ABAP data objects.
XML data as XML target
The JSON-XML data is passed to the XML target directly.
JSON writer as XML target
The JSON-XML data is passed to the writer directly.
When XML data is specified as an XML source or XML target, this covers all data that can be specified behind XML in CALL TRANSFORMATION, except for JSON data and JSON readers and writers.



Latest notes:

If the identity transformation ID is used to serialize ABAP data to JSON and deserialize JSON data to ABAP, asJSON, the canonical JSON representation of ABAP data, is applied.
Copies of the XSL transformation ID made from the repository to other XSLT programs are not handled like ID internally and cannot be used like ID for JSON data.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLES_ABEXA
See Identity Transformation with JSON Writer as Target for the various ways of specifying JSON data as an XML source.
See the asJSON examples.
ABAP_EXAMPLE_END