The Java application I am working on calls an external API that gives the following response in JSON format.
{
"response": {
"version": "1.2.0",
"data": [
[
"*",
[
"core1",
1
],
[
"core2",
1
],
[
"core3",
1
]
],
[
"*",
[
"{\"frame\":[\"frame1\",\"frame2\"]}",
10
]
],
[
"*",
[
null,
10
]
]
]
}
}
I am trying to map the response to a POJO using the following;
private String version;
private List<List<Object>> values;
Although the values of data are mapped as , I am unable to iterate and extract each content from it. My requirement is to get core1, core2, core3 to a variable coreLists and frame to frameList from the values of data. Is there a better way to map data field to POJO correctly and iterate and extract the values and assign each to separate lists?
