You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mapper.readValue(json, new TypeReference<Map<Class<? extends Object>, String>>(){}); then throws a Exception:
com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct Map key of type java.lang.Class from String "class java.util.ArrayList": not a valid representation: Can not construct Map key of type java.lang.Class from String "class java.util.ArrayList": unable to parse key as Class
at [Source: ...
As i understood from #630 the KeyDeserializer for Class should be part of Jackson. Am I missing something?
The text was updated successfully, but these errors were encountered:
Looks like problem is with serialization, not deserialization -- output is not correct, as it appears to use Class.toString(). So need to have a look at MapSerializers handling of key types.
I am having problems deserializing my
Map<Class<? extends Object>, String>
. Simple test case demonstrates it:This test serializes the map as:
mapper.readValue(json, new TypeReference<Map<Class<? extends Object>, String>>(){});
then throws aException
:As i understood from #630 the KeyDeserializer for Class should be part of Jackson. Am I missing something?
The text was updated successfully, but these errors were encountered: