You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-devguide-device-twins.md
+6-22Lines changed: 6 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -284,33 +284,17 @@ Tags, desired properties, and reported properties are JSON objects with the foll
284
284
285
285
IoT Hub enforces an 8 KB size limit on the value of `tags`, and a 32 KB size limit each on the value of `properties/desired` and `properties/reported`. These totals are exclusive of read-only elements like `$etag`, `$version`, and `$metadata/$lastUpdated`.
286
286
287
-
The size is computed by counting all characters, excluding UNICODE control characters (segments C0 and C1) and spaces that are outside of string constants.
287
+
Twin size is computed as follows:
288
288
289
-
For example, consider the following JSON fragment for reported properties. Read-only elements like `$version`and `$metadata/$lastUpdated` are not shown as they are excluded from computation of the property size limit.
289
+
*For each property in the JSON document, IoT Hub cumulatively computes and adds the length of the property's key and value.
290
290
291
-
```json
292
-
"properties" : {
293
-
...
294
-
"reported" : {
295
-
"intProperty" : 14000,
296
-
"boolProperty" : true,
297
-
"floatProperty" : 1.463E+200,
298
-
"stringProperty" : "This is a string value",
299
-
"objectProperty" : {
300
-
"property1" : 1,
301
-
"property2" : 2
302
-
}
303
-
}
304
-
}
305
-
```
291
+
* Property keys are considered as UTF8-encoded strings.
306
292
307
-
The size of the reported properties for this fragment would be computed based on the UTF-8 encoded value of the following JSON, which represents the value of `properties/reported` with the white-space removed:
293
+
* Simple property values are considered as UTF8-encoded strings, numeric values (8 Bytes), or Boolean values (4 Bytes).
308
294
309
-
```json
310
-
{"intProperty":14000,"boolProperty":true,"floatProperty":1.463E+200,"stringProperty":"This is a string value","objectProperty":{"property1":1,"property2":2}}
311
-
```
295
+
* The size of UTF8-encoded strings is computed by counting all characters, excluding UNICODE control characters (segments C0 and C1).
312
296
313
-
This yields a length of 157 bytes.
297
+
* Complex property values (nested objects) are computed based on the aggregate size of the property keys and property values that they contain.
314
298
315
299
IoT Hub rejects with an error all operations that would increase the size of the `tags`, `properties/desired`, or `properties/reported` documents above the limit.
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-devguide-module-twins.md
+6-22Lines changed: 6 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -265,33 +265,17 @@ Tags, desired properties, and reported properties are JSON objects with the foll
265
265
266
266
IoT Hub enforces an 8 KB size limit on the value of `tags`, and a 32 KB size limit each on the value of `properties/desired` and `properties/reported`. These totals are exclusive of read-only elements like `$etag`, `$version`, and `$metadata/$lastUpdated`.
267
267
268
-
The size is computed by counting all characters, excluding UNICODE control characters (segments C0 and C1) and spaces that are outside of string constants.
268
+
Twin size is computed as follows:
269
269
270
-
For example, consider the following JSON fragment for reported properties. Read-only elements like `$version` and `$metadata/$lastUpdated` are not shown as they are excluded from computation of the property size limit.
270
+
* For each property in the JSON document, IoT Hub cumulatively computes and adds the length of the property's key and value.
271
271
272
-
```json
273
-
"properties" : {
274
-
...
275
-
"reported" : {
276
-
"intProperty" : 14000,
277
-
"boolProperty" : true,
278
-
"floatProperty" : 1.463E+200,
279
-
"stringProperty" : "This is a string value",
280
-
"objectProperty" : {
281
-
"property1" : 1,
282
-
"property2" : 2
283
-
}
284
-
}
285
-
}
286
-
```
272
+
* Property keys are considered as UTF8-encoded strings.
287
273
288
-
The size of the reported properties for this fragment would be computed based on the UTF-8 encoded value of the following JSON, which represents the value of `properties/reported` with the white-space removed:
274
+
* Simple property values are considered as UTF8-encoded strings, numeric values (8 Bytes), or Boolean values (4 Bytes).
289
275
290
-
```json
291
-
{"intProperty":14000,"boolProperty":true,"floatProperty":1.463E+200,"stringProperty":"This is a string value","objectProperty":{"property1":1,"property2":2}}
292
-
```
276
+
* The size of UTF8-encoded strings is computed by counting all characters, excluding UNICODE control characters (segments C0 and C1).
293
277
294
-
This yields a length of 157 bytes.
278
+
* Complex property values (nested objects) are computed based on the aggregate size of the property keys and property values that they contain.
295
279
296
280
IoT Hub rejects with an error all operations that would increase the size of those documents above the limit.
0 commit comments