Hey all! I have a followup question regarding turning JSON into a java
object. I'm trying to take JSON objects and put them into a collection. I
tried the following approaches:
List<Character> characters = response.readEntity(new
GenericType<List<Character>>(){});
List<Character> characters =
client.target(uri).request(MediaType.APPLICATION_JSON).get(new
GenericType<List<Character>>(){});
Using those approaches got me the following:
Exception in thread "main" java.lang.ClassCastException: Character cannot
be cast to java.util.List
I'm confused; I thought I was creating a generic List that contained
Character objects in my declaration. The documentation doesn't appear to
contradict this; any thoughts?
Thanks!
John