I'm trying to deserialize json data formated in a way I haven't seen before. I'm using json.net and C#.
The class corresponding to the json should be like this:
class Example
{
public Person[] data { get; set; }
}
class Person
{
public string Id { get; set; }
public string Nationality { get; set; }
public string Name { get; set; }
}
And this is how the json looks like:
{
data: {
"123": ["SWE", "Steve"],
"221": ["USA", "Bob"],
"245": ["CAN", "Susan"]
}
}
Is it possible using attributes or do I have to do it all myself?