I have a JSON below that I'm trying to parse to a POJO using Jackson
{
"Response": {
"userIds": [
"http://example.com:10249/User/526241869918679991"
],
"userGroupIds": [
"http://example.com:10249/UserGroup/1056659494710887089"
],
"accountIds": [
"http://example.com:10249/ServiceAccount/3354613317986071030"
],
"success": true
}
}
My Response POJO snippet is as below
private boolean success;
private List<String> accountIds;
private List<String> userIds;
private List<String> userGroupIds;
and their getter and setters
Is my declaration wrong as I'm getting "org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.util.List out of START_OBJECT token" error on parse"
The parse logic is as below:
jsonMapper.readValue(responseJSONString, new TypeReference<List<Response>>() {});
Any idea where I'm making the mistake?