JSONLib.convertFromJSON copies a JSON string to a record, handler, or dictionary.
eglx.json
static function convertFromJSON(json string in, eglType any const in);
Although the second parameter is declared as ANY type, the EGL runtime verifies that the input is a record, handler, or dictionary. Because of the declaration, you can use the function in a library function that accepts any type of variable, as in the following example:
function convert(myRecord MyRecordPart in, record2Populate ANY const in) jsonLib.convertFromJSON(myRecord.data, record2Populate); end
For other details on the conversion, see “Correspondence between a JSON string and an EGL variable.”
JSONLib.convertFromJSON is the complement of the JSONLib.convertToJSON function.
Target | Issue |
---|---|
Java | No issues. |
JavaScript | The EGL runtime code rounds any numeric data that is greater than 15 significant digits. |