How to send JSON data of a sensor

67 views
Skip to first unread message

Mehdi Alisoltani

unread,
Jan 24, 2020, 3:37:49 PM1/24/20
to Sentilo
Dear Sentilo team

In the recent version of sentilo  it is possible to choose Json data type, for example, assume you have some data with the following format

{ "Flights":[
  "speed": 1000, 
   "altitude: 27500,
    "aircraft": "A320"
]
}

How to send this data to the platform?  
What kind of data type should be selected JSON/TEXT ?
 

Sentilo IO

unread,
Jan 27, 2020, 2:16:39 AM1/27/20
to Sentilo
Hi Mehdi,

For publishing complex JSON data you should include it inside the value field. The only restriction is that its contents must be "scaped"(https://stackoverflow.com/questions/3020094/how-should-i-escape-strings-in-json).
In the catalog, if the sensor data has been defined as JSON, the catalog will show it better, check: https://sentilo.readthedocs.io/en/latest/catalog_and_maps.html -> Showing complex data

Regards,
Sentilo Team

Reply all
Reply to author
Forward
Message has been deleted
0 new messages