Hi,
I've been trying to figure this out, but haven't had any luck yet, so I thought I'd post here for some help...
I have the following JSON, where the 'response' field can either be an object or a collection of those objects:
{
    "success": false,
    "error": {
        "code": "invalid_location",
        "description": "The requested location was not found in the database."
    },
    "response": [ ]
}
I'd like to map the JSON to the following POJO:
public abstract class Response<T> {
  private boolean success;
  private Error error;
  private Collection<T> response;
}
Is there a way to write a conditional deserializer that will check to see if '
response' is an object and if so, convert it to a collection of those objects? I've looked at @JsonDeserialize and the converters, but couldn't get it to do what I wanted.
Thanks!
-Tristan