Get the response JSON.
This function is an alias for GET_RESPONSE_BODY.
No parameters
List of [Text]
- list variable, that will be filled with all response page's JSON body.Text
Response JSON data.
No return value.
var
RequestJson: Text;
RequestJson := APIScriptRWU.GET_RESPONSE_JSON();
Load JSON response into JsonToken variable and work with it:
var
JSONData: JsonToken;
JToken: JsonToken;
JSONData.ReadFrom(APIScriptRWU.GET_RESPONSE_JSON());
JSONData.SelectToken('$.result[0].no',JToken);
No := JToken.AsValue().AsText();
Work with paginated result:
//Go through JSON data of all result pages
var
AllPagesBodyList: List of [Text];
i: Integer;
APIScriptRWU.GET_RESPONSE_JSON(AllPagesBodyList);
for i := 1 to AllPagesBodyList.Count do begin
JSONBody := AllPagesBodyList.Get(i);
// ... process the JSON body of current page
end;