I'm trying to parse a JSON in C# with Newtonsoft.Json component. The JSON I get is this:
[
{
"id": "2",
"title": "First Title",
"image": "550x346_442.jpg",
"audio": null,
"order": "3",
"schedule": {
"4": [
"17:00",
"17:30"
]
}
},
{
"id": "3",
"title": "Second Title",
"image": "myImage.jpg",
"audio": null,
"order": "4",
"schedule": {
"4": [
"17:00",
"18:00",
"19:30"
],
"6": [
"17:30",
"21:30"
]
}
},
]
I have a class for it and everything BUT schedule parse OK. I don't know what type use with the schedule field. I tried string[], string[,] and string[][] and always got an error. Also tried just string type, and then try to re-parse, but also failed. Every other field is parsed into a string type and works fine. I do the parsing in this way:
MyClass[] myObjects = JsonConvert.DeserializeObject<MyClass[]>(jsonStr);
What type should I use for schedule?