I get my data from a website that returns a .json format that is unfamiliar to me. I have been looking for a solution for several hours, and I have to use terminology.
json is formatted something like this:
[
{
"Foo": {
"name": "Foo",
"size": {
"human": "832.73kB",
"bytes": 852718
},
"date": {
"human": "September 18, 2017",
"epoch": 1505776741
},
}
},
{
"bar": {
"name": "bar",
"size": {
"human": "4.02MB",
"bytes": 4212456
},
"date": {
"human": "September 18, 2017",
"epoch": 1505776741
}
}
}]
I am using Newtonsoft JSON.NET and I cannot create a data structure that would allow me to deserialize it, since it is an array of classes with different names. In particular, property names "Foo"
and "bar"
may differ at run time. Property names elsewhere in the JSON hierarchy are known.
source
share