Skip to content

Commit ff48ce7

Browse files
committed
Update example
1 parent 5e95b95 commit ff48ce7

File tree

1 file changed

+17
-40
lines changed

1 file changed

+17
-40
lines changed

articles/digital-twins/concepts-twins-graph.md

Lines changed: 17 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -77,57 +77,34 @@ When represented as a JSON object, a digital twin will display the following fie
7777
| --- | --- |
7878
| `$dtId` | A user-provided string representing the ID of the digital twin |
7979
| `$etag` | Standard HTTP field assigned by the web server |
80+
| `$metadata.$model` | The ID of the model interface that characterizes this digital twin |
81+
| `$metadata.<property-name>` | Other metadata information about properties of the digital twin |
8082
| `<property-name>` | The value of a property in JSON (`string`, number type, or object) |
8183
| `$relationships` | The URL of the path to the relationships collection. This field is absent if the digital twin has no outgoing relationship edges. |
82-
| `$metadata.$model` | [Optional] The ID of the model interface that characterizes this digital twin |
8384
| `<component-name>` | A JSON object containing the component's property values and metadata, similar to those of the root object. This object exists even if the component has no properties. |
84-
| `<component-name>.<property-name>` | The value of the component's property in JSON (`string`, number type, or object) |
8585
| `<component-name>.$metadata` | The metadata information for the component, similar to the root-level `$metadata` |
86+
| `<component-name>.<property-name>` | The value of the component's property in JSON (`string`, number type, or object) |
8687

87-
Here's an example of a digital twin formatted as a JSON object:
88+
Here's an example of a digital twin formatted as a JSON object. This twin has two properties, Humidity and Temperature, and a component called Thermostat.
8889

8990
```json
9091
{
91-
"$dtId": "Cafe",
92-
"$etag": "W/\"e59ce8f5-03c0-4356-aea9-249ecbdc07f9\"",
93-
"Temperature": 72,
94-
"Location": {
95-
"x": 101,
96-
"y": 33
97-
},
98-
"component": {
99-
"TableOccupancy": 1,
92+
"$dtId": "myRoomID",
93+
"$etag": "W/\"8e6d3e89-1166-4a1d-9a99-8accd8fef43f\"",
10094
"$metadata": {
101-
"TableOccupancy": {
102-
"desiredValue": 1,
103-
"desiredVersion": 3,
104-
"ackVersion": 2,
105-
"ackCode": 200,
106-
"ackDescription": "OK"
107-
}
108-
}
109-
},
110-
"$metadata": {
111-
"$model": "dtmi:com:contoso:Room;1",
112-
"Temperature": {
113-
"desiredValue": 72,
114-
"desiredVersion": 5,
115-
"ackVersion": 4,
116-
"ackCode": 200,
117-
"ackDescription": "OK"
95+
"$model": "dtmi:example:Room23;1",
96+
"Humidity": {
97+
"lastUpdateTime": "2021-11-30T18:47:53.7648958Z"
98+
},
99+
"Temperature": {
100+
"lastUpdateTime": "2021-11-30T18:47:53.7648958Z"
101+
}
118102
},
119-
"Location": {
120-
"desiredValue": {
121-
"x": 101,
122-
"y": 33,
123-
},
124-
"desiredVersion": 8,
125-
"ackVersion": 8,
126-
"ackCode": 200,
127-
"ackDescription": "OK"
103+
"Humidity": 55,
104+
"Temperature": 35,
105+
"Thermostat": {
106+
"$metadata": {}
128107
}
129-
}
130-
}
131108
```
132109

133110
### Relationship JSON format

0 commit comments

Comments
 (0)