Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
horst_keller
Product and Topic Expert
Product and Topic Expert

ABAP and JSON? Didn't we had that before? Yes we had but since the JSON support was made available in Release 7.40 and downported to 7.02 and 7.31 (SAP Notes 1648418 and 1650141) it shouldn't be missed in a systematic overview over all important ABAP News for Release 7.40.

I will take the chance to shortly wrap up the facts about ABAP and JSON and point to the documentation where you can learn more.

JSON

JSON (JavaScript Object Notation) is a lean data exchange format, see JSON- Short Overview.

ABAP and JSON

The support of JSON in ABAP is based on the support of XML (but note that JSON is not XML).

A new format IF_SXML=>CO_XT_JSON of the sXML-Library allows JSON data to be handled with the same ABAP tools (methods and statements) as XML.

The trick is the usage of a JSON-XML-Format that maps JSON to XML and vice versa.

Like XML data, JSON data can be

When serializing ABAP data to JSON and deseralizing from JSON data to ABAP, you deal with asJSON, the canonical representation of ABAP data. asJSON can be seen as the JSON-XML representation of asXML (although there is not such an intermediate step internally).

Examples

Examples can be found here and also here.

9 Comments