Versions Compared

Key

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

...

Code Block
Result = SRP_Json(Handle, "AddValueArray", Array, Delim)

Returns

Returns 1 if successful, 0 if not.

Parameters

ParameterDescription
HandleHandle to JSON Entity. Required.
ArrayArray of values to be added to the JSON array. Required.
DelimThe array's delimiter. Optional.

Remarks

The AddValueArray service adds the given array of values as a single array node to the end of the array. This only works if Handle is a JSON array. Normally, to add an array to the end of another array, you'd have to call AddValue repeatedly:

...

The Delim parameter indicates the delimiter used to separate values in Array, which defaults to @FM if omitted.

Example

Code Block
// Create an array, add a couple values, then add a sub-array
If SRP_Json(ArrayHandle, "New", "Array") then
   SRP_Json(ArrayHandle, "AddValue", "Hello, World!", "String")
   SRP_Json(ArrayHandle, "AddValue", 67890, "Number")
   SRP_Json(ArrayHandle, "AddValueArray", "1~2~3~4~5", "~")

   SRP_Json(ArrayHandle, "Release")
 end

See Also

AddValue