sapdev logo background
sapdev logo sapdev logo
Comments

SAP ABAP ASXML REFERENCES documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

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.
  • Named reference variables are displayed as object components, whose content is usually a key for the referenced objects.

  • The referenced objects are stored as object components in the object %heap . This name corresponds to the key.

  • 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.
  • Named Reference Variables

  • Anonymous Data Objects

  • Class Instances


  • Note
  • The asJSON representation of reference variables and referenced objects is only of relevance for XSL transformations and the identity transformation ID .

  • Simple transformation s cannot currently be used to transform reference variables.
  • For data references, the value "embedded" can be specified for the transformation option

  • data_refs to define embedded storage in serializations instead of storage in the %heap object component.

    Example
    For information about the differences between serializing to %heap
    and embedded storage, see
    Serializations to Heap or Embedded .
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    ABAP_ASXML_ASJSON_EMPTY_ABEXA
    ABAP_BRANCHES




    comments powered by Disqus