Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Syntax

Code Block
Result = SRP_JSONJson(Handle, "ADDAdd", NewEntityHandle)

Returns

Returns 1 if successful, 0 if not.

Parameters

ParameterDescription
HandleHandle to JSON Entity. Required.
NewEntityHandleNew JSON entity to be added to the JSON array. Required.

Remarks

The ADD Add service adds the given entity (which must be a valid JSON Entity Handle) to the end of the array. This only works if Handle is a JSON array.

Example

Code Block
 // Create a JSON array (which initializes ArrayHandle)
If SRP_JSONJson(ArrayHandle, "NEWNew", "ARRAY") then

   // Create a JSON number
   If SRP_JSONJson(NumberHandle, "NEWNew", "NUMBER", "12345") then

       // Now add the number to the array
       SRP_JSONJson(ArrayHandle, "ADDAdd", NumberHandle)

       // Remember to release entities you've created
       SRP_JSONJson(NumberHandle, "RELEASE")
   
   end
   
   // Remember to release entities you've created
   SRP_JSONJson(ArrayHandle, "RELEASE")

 end

See Also

ADDVALUE