I'm trying to use Jackson to convert some JSON data into Java objects ,a list of objects to be precise,but I get this error:
org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of entitylayer.Detail out of START_ARRAY token
this is the code:
ObjectMapper mapper = new ObjectMapper();
List<Detail> lcd = (List<Detail>) mapper.readValue(ld, Detail.class);
ld is the list in Json format, this is the part that makes me comfused in the jackson tutorial. what does new File("user.json") represent? I assumed that was the string in json format I wanted to convert, that's why I used ld.
I hope you can help me out with it