I am using Newtonsoft.Json
to parse my response. But for the below response I don't know how to create a model class and how to show it on an expander.
My Response:
{
"calendarEvents": {
"2021-05-03T05:00:00.000+0000": [
{
"title": "Event 2",
"description": "Event 2"
}
],
"2021-05-04T05:00:00.000+0000": [
{
"title": "Event 3",
"description": "Event 3"
}
],
"2021-05-05T05:00:00.000+0000": [
{
"title": "Event 3",
"description": "Event 3"
},
{
"title": "Event 4",
"description": "Event 4"
}
]
}
}
I tried something like below:
public class MyEvents
{
public List<calendarEvents> calendarEvents { get; set; }
}
public class calendarEvents
{
//What will be here? it is also a list and it has no stable key
}
public class Dummy//(Top class name here)
{
public string title { get; set; }
public string description { get; set; }
}
Instead of 2021-05-03T05:00:00.000+0000
this what I can add to the model class? The response is a list of items inside another list. Plan to use an expander to show this on UI, so any extra implementation need for that?