sapdev logo background
sapdev logo sapdev logo
Comments

SAP ABAP JSON TRAFO ID documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

Identity Transformations for JSON
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 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 must be in an asJSON format that matches the ABAP data objects. The JSON data is deserialized directly to the ABAP data objects. In this concept, an
    asJSON-XML representation of the asJSON data is edited 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.

    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.


  • Example
    See Identity Transformation with JSON
    Writer as Target for the various ways of specifying JSON data as an XML source.

    Examples
    See the asJSON examples.
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    ABAP_JSON_TRAFOS_SELF
    ABAP_JSON_XML




    comments powered by Disqus