I have a json file that contains a nested array of values:
[
{"target": "dsdsa",
"datapoints":
[
[94.283, 1435080720],
[94.233, 1435080780],
....
]
}
]
I'm having problem parsing inner nested arrays. I'm using Spring and Jackson. I first parse the outer array using:
Output[] allJson = restTemplate.getForObject("json/url",Output[].class);
where Output is a POJO:
public class Output
{
public String target;
//public Datapoint[] datapoints;
}
public class Datapoint
{
private double[] points;
}
Using this I can access the "target" from the json. But if I uncomment it, Jackson is not able to map the array of array of values to the Datapoints.
Do I need another wrapper class? I couldn't find any example where inside the array there is anything except json objects and Jackson parses it.