Receives a JSON string from which the SDT is loaded.
[&Boolean =] &SDT.FromJson(&String[, &Messages])
Type returned:
The type returned is a Boolean. It returns False in case of having an error, otherwise it returns True.
Assigning the return value is optional.
Where:
&String |
Attribute or variable string. |
|
&SDT |
Variable based on SDT. |
|
&Messages |
Variable based on GeneXus's Messages data type. In case of an error it contains the error information. This Parameter is optional. |
It loads the &SDT structure from the &String variable content. This variable's JSON format must be compatible with the SDT's structure.
Data Type Mapping
The GeneXus basic data types are mapped to JSON data types in this way:
Character, VarChar, LongVarChar --> JSON string
Boolean --> JSON Boolean
Numeric --> JSON Number
Collections --> an ordered sequence of values, comma-separated and enclosed in square brackets
Ignored SDT Properties
The following properties are ignored in the process of serializing an SDT to JSON:
- XML Type
- XML Name
- XML Namespace
- SoapType
This method is available in Smart Devices on client-side for business components since GeneXus 16 upgrade 2.
See Also
ToJson Method
Structured Data Type (SDT) object
|