I'm receiving a JSON
response from a PHP server. In android, I need to write a java model (POJO) to use to parse the response in Retrofit (An Android library for http-requests).
JSON Structure:
{
"calendar": {
"2016-06-10": [
{
"time": "10h00m",
"title": "PROVA P2",
"description": "LP / RED / ED.FIS - 80 E 90",
"color": "#990000"
}
],
"2016-06-11": [
{
"time": "10h00m",
"title": "SIMULADO",
"description": "LOREM PSIUM DOLOR LOREM",
"color": "#009900"
},
{
"time": "11h00m",
"title": "CONSELHO DE CLASSE",
"description": "LOREM PSIUM DOLOR",
"color": "#009900"
}
]
},
"error": false
}
This JSON
is from PHP Server.
How can I handle it using Retrofit?