Quick JSON example

This is a simple example with JSON objects and arrays.
{
  "temperature": [
     {
        "Timestamp":"28-Jun-18 4:42 PM BST",
        "Value":21.83
     }
  ]
}

In this example:

  • A root object encloses the whole payload with open and close braces { }. A JSON schema object is a named container that holds other schema entities. By itself an object has no properties or additional containers.
  • A JSON array named “temperature”. An array is a named container represented by brackets [ ] that holds other schema entities.
  • An object, in braces { }, is contained by the “temperature” array.
  • The object contains a string “Timestamp” and a numeric “Value.” Each appears as a key/value pair inside the object.

You could construct this simple example using StringConcat components from the kitControl module, however, if you have many points it would take a lot of work to create this construct for every point. A JSON schema can work across many points without extra effort.