ARTICLE
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.
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.
Example
See asJSON for Elementary
ABAP Types .
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved