JSON-encoding for time series data

LinkedFactory uses a JSON-based format for time series data. The following document shows an example for the two resources resource1 and resource2:

{
    "http://example.org/resource1": {
       "http://example.org/properties/p1": [
           { "value": 20.3, "time": 1619424246100 },
           { "value": 20.4, "time": 1619424246120 }
       ],
       "http://example.org/properties/p2": [
           { "value": { "msg" : "Error 1", "nr" : 1 }, "time": 1619424246100 }
       ]
    },
    "http://example.org/resource2": {
       "http://example.org/properties/speed": [
           { "value": 120.3, "time": 1619424246100 }
       ]
    },
}

The principal structure of such a JSON document is:

  • Item 1

    • Property 1: […​ values …​]

    • …​

    • Property n: […​ values …​]

  • …​

  • Item n

    • Property 1: […​ values …​]

    • …​

    • Property n: […​ values …​]

This structure is represented within the JSON format as follows:

`{ "Item-1" : { "Property-1" : [... values ... ], "Property-2": [... values ...], ... }}`.
Table 1. Supported value types
Type Description Examples

number

Integer and floating point numbers as supported by JSON. The precision of numbers may be restricted to 64 bit by implementors to improve storage efficiency.

  • 3

  • 3.78

string

Character strings of arbitrary length.

  • "This is a string."

boolean

The boolean values true and false.

  • true

  • false

array

Possibly nested array to represent lists, vectors or matrices.

  • [5, 3.7]

  • [["a", 5.3, true], ["b", 5.7, false]]

record

Possibly nested key-value pairs to represent complex data objects.

  • {"message": "Error 439: Component was unable to start.", "nr": 439}

URI

JSON-LD-based URIs to create links to other assets.

  • { "@id": "https://example.org/assets/machine1"}

  • {"rawMaterial": { "@id": "https://example.org/material/coil3"}, "thickness": 12}