jsonAddValueBool (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

All

Firmware version:

2.10.00


jsonAddValueBool adds the provided boolean value to the end of the given JSON array, growing the size of the array by 1.

 

Input:

o : SYSHANDLE

A handle to the JSON array to add the value to.

 

value : BOOL

The value to add.

 

Returns: INT

1

- Success.

0

- Function is not supported.

-3

- Invalid handle.

-4

- Not an array

-99

- Failed to add value

 

 

Declaration:

FUNCTION jsonAddValueBool : INT;
VAR_INPUT
  o     : SYSHANDLE;
  value : BOOL;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc  : INT;
  arr : SYSHANDLE;
END_VAR;
 
BEGIN
  ...
  // Create array
  rc := jsonCreateArray(o := arr);
  // Add boolean value
  rc := jsonAddValueBool(o := arr, value := TRUE);
  ...
END;
 
END_PROGRAM;