I'm getting this error when deserialzing json to an ArrayList
12-31 05:29:10.963: W/System.err(2939): org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of VALUE_TRUE token
here's the structure of the json:
{
"c_Evenement" : [{
"id" : {
"o_id" : 9,
"t_id" : 1,
"key" : "1_9"
},
"bla1" : "bla bla bla bla",
"bla2" : "bla bla bla bla",
"bla3" : "bla bla bla bla",
"bla4" : "bla bla bla bla"
}
],
"themes" : [{
"id" : 1,
"nom" : "Administration"
}
],
"c_Theme" : [{
"id" : {
"couche_id" : 761,
"theme_id" : 1,
"key" : "1_761"
},
"layerId" : 0
}
],
"message" : null,
"ok" : true
}
here's the LireTheme class :
@JsonIgnoreProperties(ignoreUnknown=true)
public class LireTheme {
private Themes themes;
private CouchesTheme c_Theme;
private ClassesEvenement c_Evenement;
private String message;
private boolean ok;
//getters and setters
}
here's the LireTheme class that is simply a mapping HashMap :
public class LireThemes extends HashMap<String, ArrayList<LireTheme>> {
private static final long serialVersionUID = 1L;
}
and here's how i deserialize it :
LireThemes lirethemes = null;
ArrayList<LireTheme> themeList = null;
final InputStream stream = context.getAssets().open("lireThemes.json");
lirethemes = objectMapper.readValue(stream, LireThemes.class);
themeList = lirethemes.get("themes");
i really need help please.