I have a complex json as in here
I am trying to map this in my model class \'ChromeJsonModel\' like :
Type collectionType = new TypeToken
In you json root element is json object:
{ <---- HERE YOU HAVE "OBJECT"
"test-run": {
"duration": 508.56199999999995,
"result": "Passed",
...
}
}
Change:
List jsonModelList = (List) ... ;
to:
ChromeJsonModel jsonModelList = (ChromeJsonModel) ... ;
You can try to generate POJO there: http://pojo.sodhanalibrary.com/