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 JsonObject variable.
[Ok := ] JsonObject.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 JsonObject will be disconnected from its current JSON tree and the data contained by the JsonObject will be replaced with the new value.
- To delete the contents in a JsonObject variable use the Clear function.
To delete the contents in a JsonObject variable use the Clear function.
This example shows how to read JSON data from a string into a JsonObject variable.
local procedure ReadJson(data : Text) result : JsonObject; begin result.ReadFrom(data); end;