{
"Filters": [{
"Decription": "Default",
"FieldSelected": {
"AppointmentDate": true,
"AppointmentDateOrder": 1
"ptStatusOrder": 3
},
"FilterID": 1
}, {
"Decription": "chart",
"FieldSelected": {
"AppointmentDate": true,
"AppointmentDateOrder": 1,
"ptStatusOrder": 0
},
"FilterID": 2
}]
}
I am getting a response of this structure, how do i map it to my POJO class. Can anyone give a sample POJO class for this json structure. I am using Gson for Request and Response.
Just map one Json Object as a Java Class. And make an Array of Object as a List..
Like, (pseudo code only)
You are using GSON library so import
SerializedNamein your pojo classes.Pojo Class looks like,
And main ListFileter class,
And in Android code,