convertFromJSON()

The serviceLib.convertFromJSON() system function converts a JSON string into a record or dictionary.

In a Rich UI application, the EGL runtime code rounds any numeric data that is greater than 15 significant digits. The rounding does not occur if the function is invoked outside of Rich UI.

For other details on the conversion, see “Correspondence between a JSON string and an EGL variable.”

Syntax

  serviceLib.convertFromJSON(json STRING in, 
                                   recordOrDictionary ANY const in)
json
A JSON string
recordOrDictionary
The name of a non-structured record or dictionary.
Note: Although this argument is declared as ANY type, the EGL runtime verifies that the input is a Record or Dictionary part. Because of the declaration, you can use the function in a library function that accepts any type of record, as in the following example:
function convert(gwr UIGatewayRecord in, record2Populate ANY const in)
  serviceLib.convertFromJSON(gwr.data, record2Populate);
end

Feedback