Versions Compared

Key

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

...

Code Block
// Create a JSON array, add elements to it, and get the count
If SRP_Json(ArrayHandle, "New", "Array") then
   SRP_Json(ArrayHandle, "SetValue", 1, "12345")
   SRP_Json(ArrayHandle, "SetValue", 10, 67890, "Number")
   SRP_Json(ArrayHandle, "SetValue", 5, 1, "Boolean")
   SRP_Json(ArrayHandle, "Release")
end

// Create a JSON object, add members to it, and get the count
If SRP_Json(ObjectHandle, "New", "Object") then
   SRP_Json(ObjectHandle, "SetValue", "name", "John Doe")
   SRP_Json(ObjectHandle, "SetValue", "city", "Washington D.C.")
   SRP_Json(ObjectHandle, "SetValue", "zip", "12345", "Number")
   SRP_Json(ObjectHandle, "Release")
   SRP_Json(ObjectHandle, "Release")
end

See Also

SetAddAddValue