Versions Compared

Key

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

...

Code Block
// Create a JSON array, add elements to it, then remove one
If SRP_Json(ArrayHandle, "New", "ARRAYArray") then
   SRP_Json(ArrayHandle, "AddValue", "12345")
   SRP_Json(ArrayHandle, "AddValue", 67890, "NUMBERNumber")
   SRP_Json(ArrayHandle, "AddValue", 1, "BOOLEANBoolean")
   Result = SRP_Json(ArrayHandle, "Remove", 2)       ; // Sets element 2 to null
   SRP_Json(ArrayHandle, "Release")
end

// Create a JSON object, add members to it, then remove one
If SRP_Json(ObjectHandle, "New", "OBJECTObject") then
   SRP_Json(ObjectHandle, "SetValue", "name", "John Doe")
   SRP_Json(ObjectHandle, "SetValue", "city", "Washington D.C.")
   Result = SRP_Json(ObjectHandle, "Remove", "city") ; // removes "city" member
   SRP_Json(ObjectHandle, "Release")
end

...