I'd like to deserialize this JSON as a C# class, but I need to define the class first:
{
"Prods": [
{
"ID": {
"1001": [
{
"Name": "Name1",
"Prod": "XXX"
},
{
"Name": "Name2",
"Prod": "XXXX"
}
]
}
},
{
"ID": {
"2001": [
{
"Name": "Name3",
"Prod": "XXX-000"
},
{
"Name": "Name4",
"Prod": "XXXX-1111"
}
]
}
}
]
}
I'd like to deserialize it into something like this, but nor sure if my JSON structure fits it:
public class Prod
{
int CATID;
Dictionary<string, string> prods = new Dictionary<string, string>();
}
public class Prods
{
public List<Prod> Products {get;set;}
}
How should I change the JSON above to fit with my class below it, so I can use JsonConvert to deserialize into it?
Thanks!