restRespBodyGetJSON (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

ALL

Firmware version:

2.10.00


This function will read the contents of the body of the response as a JSON structure.

 

Input:

resp : SYSHANDLE

A handle to the response.

 

 

Output:

json : SYSHANDLE

A handle to the JSON structure created from the body content.

When the JSON structure is no longer needed, it must be released using jsonFree.

 

 

 

Returns: INT

1


- Success

0


- Not supported

-1


- Invalid response

-2


- The max number of JSON structures have already been created.

-3


- Failed to create JSON structure. Body content might not be valid JSON.

 

Declaration:

FUNCTION restRespBodyGetJSON : INT;
VAR_INPUT
  resp            : SYSHANDLE;
  json            : ACCESS SYSHANDLE;
END_VAR;

 

 

Example:

Please see the "Examples - REST Example"