s = symbol_name.getJson(ʃserializationOptions := serialization_optionsʅ);
The
Symbol.getJson function returns the
JSON representation of a symbol. The symbol's metadata is always returned, and when a symbol supports representing its value as JSON, the value is also returned. The optional
serialization_options argument allows you to specify how the symbol
should be serialized, potentially overriding the
default application settings.
You can use the
Symbol.getValueJson function if you only want to work with the symbol's value. You can also use the
Logic.getSymbol action to get a symbol's metadata and value.
All symbols support the serialization of the symbol metadata. The following table describes the value-related serialization routines available for CSPro objects and contains links to the description of the
JSON representation for each object.
Documentation about JSON representations feature will come in a future release. In the meantime you can see if the documentation is updated at:
The function returns the JSON representation of the symbol's metadata, and the value when applicable.
The JSON result may look similar to:
{
"name": "usmca_countries",
"type": "List",
"contentType": "string",
"value": [
"Canada",
"Mexico",
"United States"
]
}