Open Messaging Interface (O-MI), an Open Group Internet of Things (IoT) Standard – JSON Mapping and Examples

 

Many XML generation and manipulation tools can convert XML messages into JSON, and vice versa. There are also many frameworks that can make the necessary conversions during runtime.

{     "XML": {         "version": 1.0,         "encoding": "UTF-8"     },     "omi:omiEnvelope": {         "xmlns:omi": "omi.xsd",         "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",         "xsi:schemaLocation": "omi.xsd omi.xsd",         "version": 1.0,         "ttl": -1,         "omi:write": {             "msgformat": "odf",             "targetType": "device",             "omi:msg": {                 "xmlns": "odf.xsd",                 "xsi:schemaLocation": "odf.xsd odf.xsd",                 "Objects": {                     "Object": {                         "id": "SmartFridge22334411",                         "InfoItem": [                             {                                 "name": "FridgeTemperatureSetpoint",                                 "value": 3.5                             }, {                                 "name": "FreezerTemperatureSetpoint",                                 "value": -20.0                             }                         ]                     }                 }             }         }     } }