forked from telefonicaid/fiware-orion
-
Notifications
You must be signed in to change notification settings - Fork 43
Supporting DateTime
Jose M. Cantera edited this page Jan 15, 2019
·
7 revisions
TemporalProperty
is not allowed for user terms. Thus, for specifying a Property which represents a DateTime there are two different options.
A/ The type is provided inline.
{
'id': 'urn:ngsi-ld:T:34567',
'type': 'T',
'P1': {
'type': 'Property',
'value': {
'@type': 'DateTime',
'@value': '2018-12-04T12:00:00Z'
}
},
'@context': ['https://fiware.github.io/NGSI-LD_Tests/ldContext/testFullContext.jsonld']
}
Or B/The type is provided in the @context. It could be inline or it could be inside the document which contains the @context itself.
{
'id': 'urn:ngsi-ld:T:34567',
'type': 'T',
'P1': {
'type': 'Property',
'value': '2018-12-04T12:00:00Z'
},
'@context': ['http://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld', {
'P1': {
'@type': 'DateTime',
'@id': 'http://example.org/test/P1'
}
}],
}