public static < T > T deserializeObject ( final Class < T > expectedType , final String json ) throws IllegalArgumentException { final ClassFieldCache classFieldCache = new ClassFieldCache ( /* resolveTypes = */ true , /* onlySerializePublicFields = */ false ) ; return deserializeObject ( expectedType , json , classFieldCache ) ; }
Deserialize JSON to a new object graph with the root object of the specified expected type . Does not work for generic types since it is not possible to obtain the generic type of a Class reference .