ToJson Method

Official Content
This documentation is valid for:

It returns a string with the JSON representation for the SDT or BC variable. 


&String = &SDT.ToJson([&Boolean])


    Attribute or variable string.
    Variable based on SDT.
     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" ]



Objects ProcedureTransactionWeb Panel
Lenguages .NET, Java.



This method is available in Smart Devices on client-side for business components since GeneXus 16 upgrade 2

See Also

FromJson Method
Structured Data Type Object

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.