I have a class that I am trying to serialize to JSON using Jackson:
class A {
String someString;
Map<String, Long> someMap;
}
I am serializing using the following code:
mapper.writeValueAsString(a);
where a is an instance of class A.
I am getting this exception:
com.fasterxml.jackson.databind.JsonMappingException: java.lang.Double cannot be cast to java.lang.Long (through reference chain ... java.util.HashMap)
I have tried enabling different Default Typing, but that has not helped.
someMappopulated?