How can I deserialize Json into C# objects that have ID's for the node keys? For example:
{
"people" : {
"1": {
"firstname": "jim",
"lastname": "brown"
},
"2": {
"firstname": "kathy",
"lastname": "jones"
}
}
}
Would serialize into this C# class
public class JsonRoot {
public List<Person> People { get; set; }
}
public class Person {
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
Is this possible to do using either a custom generic converter or json attributes?