Returns a string with the JSON representation for the Structured Data Type (SDT) object or Business Component variable.
&String = &Vble.ToJson([&Boolean])
Where:
&String |
Attribute or variable based on the Character data type. |
|
&Vble |
Variable based on an SDT or Business Component. |
|
&Boolean |
Optional parameter: It only applies to Business Component variables. If True, then the returned string contains the auxiliary variables (old values, mode, initialized flag). Otherwise, it only contains the record data. The default value is True. |
Given the following SDT:

The result is:
{
"Name" : "Uruguay",
"Language" : "Spanish",
"Coordinates" :
{
"Latitude" : 30,
"Longitude": 35,
},
"Cities" : ["Montevideo", "Paysandu" ]
}
See Also
FromJson Method
Structured Data Type (SDT) object