I am trying to map following data to POJOs but having no clue how to handle it, I have to map this data and finally show it in recycler view cards.
Till now I have create a ScoreCard class, and SingleInning Class.
Main problem I am facing is when looping through past_ings array, I have no idea how to store another array array or sub Object in it. Like how to store and how to get the value in onBinderViewHolder in my Adapter.
{
"query": {
"count": 1,
"created": "2017-08-13T19:57:10Z",
"lang": "en-US",
"results": {
"Scorecard": {
"v": "0",
"mid": "196674",
"m": "1",
"ecf": "0",
"mn": "3rd Test",
"ps": "0",
"past_ings": [
{
"s": {
"m": "1",
"t": "1",
"i": "3",
"ps": "0",
"stay_live": "Yes",
"ld": "No",
"ldmsg": null,
"pms": "live",
"dm": "Day 2",
"sn": "3",
"d": "Stumps",
"a": {
"fo": "1",
"pp": null,
"i": "8",
"cr": "1.46",
"r": "19",
"o": "13",
"w": "1",
"b": "0",
"lb": "0",
"wd": "0",
"nb": "0",
"pt": "0",
"l": "0",
"tl": "trails by 333"
}
}
},
{
"s": {
"m": "1",
"t": "1",
"i": "3",
"ps": "0",
"stay_live": "Yes",
"ld": "No",
"ldmsg": null,
"pms": "live",
"dm": "Day 2",
"sn": "3",
"d": "Stumps",
"a": {
"fo": "1",
"pp": null,
"i": "8",
"cr": "1.46",
"r": "19",
"o": "13",
"w": "1",
"b": "0",
"lb": "0",
"wd": "0",
"nb": "0",
"pt": "0",
"l": "0",
"tl": "trails by 333"
}
}
}
]
}
}
}
}