I managed out how to make it works. Tell me in case I am wrong.
I used only one way to serialize/deserialize: I removed all annotations regarding this (@JSONSerialize
and @JSONDeserialize
) and registered Serializers and Deserializers in CustomObjectMapper
class.
I didn't find an article explaining this behaviour but I resolved in this way. Hope it's useful.