Is it possible to serialize object using Jackson,but ignoring custom serializers registered with annotation @JsonSerialize(using = MyCustomSerializer.class)
?
Rationale:
I want to use Jackson to convert my object to Map, using com.fasterxml.jackson.databind.ObjectMapper.convertValue(object,Map.class)
.
Currently it does not work, because my class has custom serializer (@JsonSerialize) but misses deserializer. I require custom serializer, and I really do not need and do not want to write deserializer.
ObjectMapper.convertValue
uses my serialization then fails at deserialization.
I would like to have ObjectMapper that will just ignore @JsonSerialize and use default serialization logic. Is that possible with Jackson?