hi experts,
i am creating an app using AL language.
in this code, i need to use a json code.
however i couldn't convert json result to jsonArray.
when running this code,
here is the code.
// Process JSON response
Clear(JsonArray);
JsonArray := ReadJson(JsonText);
local procedure ReadJson(data : Text) result : JsonArray;
begin
Message(data); //todo : remove
if not result.ReadFrom(data) then
Error('Invalid response, expected an JSON array as root object');
end;
here is the response data, JsonText
{
"results": {
"common": {
"errorMessage": "success",
},
"target": [
{
"liNm": "",
"rnMgtSn": "116502102001",
"mtYn": "0",
"bdMgtSn": "1165010800113280001000001"
}
]
}
}
thank you in advance.
jk
*This post is locked for comments
I have the same question (0)