Download JSON code to a string variable.

Call:

int ires = ts_json(int iJSONObjectDescr, "EncodeToStr", string &sJSON);


Here:

iJSONObjectDescr - descriptor of the JSON type object from which to load the code,

sJSON is a string variable into which the JSON object should be uploaded.

Returns 0 on successful upload.

Example.

Download JSON code to a string.


string sJSON;


int ires = ts_json(iJSONConfig, "EncodeToStr", sJSON);

coutvar << sJSON; // display the contents of the sJSON variable in the message box