I have a JSON-String (below). I want to deserialize it to a C# Object and get the data as a list. My problem is, that the data is not available in an JSON array. How do I need to prepare my solution that I can get data in this structure:
- Sensors
- Sensor 1
- Sensor 2
- Sensor 3
For Sensor 1 - n I just need the GUIDs in a list. The data behind is not relevant.
In the Code I replaced all GUIDs with "GUID"
{
"object": {
"GUID": {
"type": "sensor",
"owner": "GUID",
"time": 1482499665,
"description": "Temperatursensor 1",
"sdevice": "00003639",
"model": "SOLUCON Industry Temperature",
"tag": [
"GUID",
"GUID"
]
},
"GUID": {
"type": "sensor",
"owner": "GUID",
"time": 1482499758,
"description": "Wassersensor 1",
"sdevice": "000056d9",
"model": "SOLUCON Industry Water",
"tag": [
"GUID",
"GUID"
]
},
"GUID": {
"type": "sensor",
"owner": "GUID",
"time": 1482499797,
"description": "Rauchmelder 1",
"sdevice": "00008519",
"model": "TG551A",
"tag": [
"GUID",
"GUID"
]
},
"GUID": {
"type": "sensor",
"owner": "GUID",
"time": 1483888365,
"description": "SOLUCON Industry Multi 2",
"sdevice": "0000d409",
"model": "SOLUCON Industry Multi",
"tag": [
"GUID",
"GUID"
]
}
},
"status": "ok"
}