Unable to create mapping object / response model for the received JSON response from the service.
Tried of creating custom JsonConverter but could not find any appropriate method which can help to resolve the Deserializing issue
The following is the JSON response which i am getting from the Service.
{
"$base": "Collection",
"nodeType": "PROTOCOL",
"Smart Building 0": {
"$base": "Collection",
"nodeType": "NETWORK",
"truncated": "true"
},
"Smart Building 1": {
"$base": "Collection",
"nodeType": "NETWORK",
"truncated": "true"
},
"Smart Building 2": {
"$base": "Collection",
"nodeType": "NETWORK",
"truncated": "true"
}
}
Example 1:- Same service can return below JSON format
{
"$base": "Collection",
"nodeType": "PROTOCOL",
"Smart Building 0": {
"$base": "Collection",
"nodeType": "NETWORK",
"truncated": "true"
},
"Smart Building 1": {
"$base": "Collection",
"nodeType": "NETWORK",
"truncated": "true"
}
}
Create c# root object class so that it can easily used to Deserializing using JsonConvert