The AL developer preview is still evolving with frequent updates. Follow us on the Dynamics NAV Team Blog for the announcements.
Reads the JSON data from the string into a JsonValue variable.
[Ok := ] JsonValue.ReadFrom(String)
The String object from which the JSON data will be read.
Property Value/Return Value
True if the read was successful; otherwise, false.
If you omit this optional return value and if the read does not execute successfully, then a run-time error occurs.
- This method can fail if the JSON data is malformed..
- If the operation succeeds, the JsonValue will be disconnected from its current JSON tree and the data contained by the JsonValue will be replaced with the new value.
- To delete the contents in a JsonValue variable use the Clear function.
To delete the contents in a JsonValue variable use the Clear function.
This example shows how to read JSON data from a string into a JsonValue variable.
local procedure ReadJson(data : Text) result : JsonValue; begin result.ReadFrom(data); end;