JSON Formatting to Update Properties
This topic illustrates the JSON format to use when sending property update messages from remote devices so that the messages can be consumed by the Azure IoT Hub Connector and the related properties can be set in the ThingWorx Platform.
Supported ThingWorx Types
The following table shows the ThingWorx base types that are supported for most properties and the JSON format to use for setting the propertty. In general when setting properties, use following basic format:

{"<propertyName>":"<propertyValue>"}
Base Type
Example Property Name
JSON Format to set property
Resulting Value in ThingWorx
STRING
stringProperty
{ "stringProperty": "string value"}
string value
INTEGER, LONG, DOUBLE, NUMBER
IntegerProperty
{"IntegerProperty": 10}
10
BOOLEAN
boolProperty
{ "boolProperty": true}
true
{"boolProperty": false}
false
{"boolProperty": "true" }
true
{"boolProperty": "x"}
false - any string that is not equal to case-insensitive "true" . For example, any string that is NOT “true”, “True”, “TrUe”. All of these are true
Any number (as a STRING or an INTEGER or NUMBER
that is not equal to zero (0)
STRING:
{"boolProperty": "2"}
INTEGER or NUMBER
{"boolProperty": 2}
true
DATETIME
dateProperty
{ "dateProperty": "1634630768641"}
{ "dateProperty": 1634630768641}
The date/time value can be entered with or without double quotation marks. The resulting value will be the same
2021-10-19 04:06:08.64
{ "dateProperty": "<dateTimeString>"}
<dateTimeString> accepts the following joda-time dateTime parsing formats It accepts formats described by the following syntax:

datetime = time | date-opt-time
time = 'T' time-element [offset]
date-opt-time = date-element ['T' [time-element] [offset]]
date-element = std-date-element | ord-date-element | week-date-element
std-date-element = yyyy ['-' MM ['-' dd]]
ord-date-element = yyyy ['-' DDD]
week-date-element = xxxx '-W' ww ['-' e]
time-element = HH [minute-element] | [fraction]
minute-element = ':' mm [second-element] | [fraction]
second-element = ':' ss [fraction]
fraction = ('.' | ',') digit+
offset = 'Z' | (('+' | '-') HH [':' mm [':' ss [('.' | ',') SSS]]])
LOCATION
locationProperty
{ "locationProperty": {"elevation":16.0,"latitude":12.0,"longitude":14.0}}
12, 14, 16
{ "locationProperty": "12.0,14.0,16"}
12, 14, 16
JSON
jsonProperty
* 
for information on working with JSON objects in ThingWorx, refer to Working with JSON Objects in the ThingWorx Platform 9 Help Center.
{"jsonProperty": {"str":"foo","bool":false,"int":5}
{"str":"foo","bool":false,"int":5}
{"jsonProperty":[{"elevation":14.0,"latitude":12.0,"longitude":14.0}, {"elevation":1.0,"latitude":1.0,"longitude":1.0}]}

{
"array": [
{
"elevation": 14,
"latitude": 12,
"longitude": 14
},
{
"elevation": 1,
"latitude": 1,
"longitude": 1
}
]
}
INFOTABLE
infoProperty
* 
For information on working with infotables, refer to Working with Infotables in the ThingWorx Platform 9 Help Center.
Make sure the JSON value matches the name/property values of the related Data Shape. This example infoProperty has a Data Shape with two string properties called name and description:

{"infoProperty": {"name":"resourceName","description":"resourceDescription"}}