Receives a JSON string from which the SDT is loaded.
[&Boolean =] &SDT.FromJson(&String[, &Messages])
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.
| Attribute or variable string.
| Variable based on SDT.
| 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
This method is available in Smart Devices on client-side for business components since GeneXus 16 upgrade 2.
Structured Data Type (SDT) Object