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 ...], ... }}`.
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. |
|
string |
Character strings of arbitrary length. |
|
boolean |
The boolean values |
|
array |
Possibly nested array to represent lists, vectors or matrices. |
|
record |
Possibly nested key-value pairs to represent complex data objects. |
|
URI |
JSON-LD-based URIs to create links to other assets. |
|