The Json data received from the http server is like this:
[
{
"token":"NlhYnzF0xqG"
},
[
{
"ts":"2019-03-21 14:06:22.123",
"id":"CC_RTC_Second",
"val":"22"
},
{
"ts":"2019-03-21 14:06:00.096",
"id":"CC_RTC_Minute",
"val":"6"
},
{
"ts":"2019-03-21 14:00:00.276",
"id":"CC_RTC_Hour",
"val":"14"
}
]
]
I have tried some techniques presented in Newtonsoft.Json documentation, but I could not find the correct way. I spent two days by testing the solutions from StackOverflow answers, but with no success.
What C# types and techniques should I use in this particular case?
Data structure can vary:
complete list of attributes is: td, id, val, flags, type, uts, nr.
All of them are strings.
Server can omit the attrs if they do not exist, so for example I can obtain only ts + id.
Is there any way how to work with such a data?
>() : (object)token.ToObject())`, replace with the right types.
>>(your JSON Data Object gos here)`
– bilpor Mar 22 '19 at 11:56