I have a few model classes that extend LinkedHashMap<String, Object>
: they define getters and setters which wrap the Map's get and put methods. I am trying to serialize instances of these classes using Jackson (with RESTEasy), but Jackson refuses to pay attention to my getters, which are annotated with @JsonProperty
. Instead, it is only serializing the key-value pairs of the backing map. I tried using @JsonAutoDetect
to disable auto-detection for all methods and fields, but that didn't change anything. Is there a way to prevent Jackson from automatically serializing a Map, or must I create new model classes that don't extend LinkedHashMap<String, Object>
?