Let's say I have a json string that looks like this:
{
"customers": [{
"id": 1,
"name": "Bob"
},
{
"id": 2,
"name": "Mary"
}
],
"products": [{
"id": 1,
"description": "apple",
"price": 0.50
},
{
"id": 2,
"description": "orange",
"price": 0.75
}
]
}
And from that string, I need to get a List<customer>
:
public class Customer
{
public int Id { get; set; }
public string Name { get; set; }
}
Maybe I'm missing something, but I'm not seeing in the Newtonsoft docs how to do this.