ABAP Keyword Documentation →  ABAP − Reference →  Data Interfaces and Communication Interfaces →  ABAP and JSON →  Transformations for JSON →  asJSON - Canonical JSON Representation →  asJSON - Mapping of ABAP Data Types → 

asJSON - Mapping of Reference Variables and Objects

A reference mechanism is used (like in asXML) for the asJSON display of anonymous data objects and class instances (objects), which are addressed using references in reference variables. As JSON does not suggest any syntax for references, an SAP-specific reference mechanism based on asXML is used.

In addition to the value, the dynamic type of the reference variables is specified in the object components of %heap when serialization takes place. This ensures that deserialization is unambiguous.

Note

Example

For information about the differences between serializing to %heap and embedded storage, see Serializations to Heap or Embedded.




Continue
asJSON - Named Reference Variables
asJSON - Anonymous Data Objects
asJSON - Instances of Classes