JsonArray.ReadFrom(Text) Method
Version: Available or changed with runtime version 1.0.
Reads the JSON data from the string into a JsonArray variable.
Syntax
[Ok := ] JsonArray.ReadFrom(String: Text)
Parameters
JsonArray
Type: JsonArray
An instance of the JsonArray data type.
String
Type: Text
The String object from which the JSON data will be read.
Return Value
[Optional] Ok
Type: Boolean
true if the read was successful; otherwise, false. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.
Remarks
This method can fail if the JSON data is malformed. If the operation succeeds, the JsonArray will be disconnected from its current JSON tree and the data contained by the JsonArray will be replaced with the new value. To delete the contents in a JsonArray variable use the Clear function.
Clear(JsonArray)
Example
This example shows how to read JSON data from a string into a JsonArray variable.
local procedure ReadJson(data : Text) result : JsonArray;
begin
result.ReadFrom(data);
end;
See Also
JsonArray Data Type
Get Started with AL
Developing Extensions
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應