Skip to content

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 Elementary ABAP Types

The values of elementary ABAP types are represented in asJSON using the JSON representations of character-like values and number values. Representations of Boolean values and zero are not used.

  • The values of all numeric types (i, p, decfloat16, decfloat34, f) are represented directly as JSON number values.
  • The values of all other types (c, string, n, d, t, x, xstring) are represented as character-like values in quotation marks.

The type-dependent format of a value corresponds to the asXML representation of elementary types and can be take from the tables there. The serialization and deserialization behavior noted there applies.

Other versions: 7.31 | 7.40 | 7.54


Note

An elementary ABAP data object that does not have an associated JSON object component in deserializations retains its previous value. To initialize the data object in this case, the transformation option clear with the value "all" can be used.