Jackson 2.2 mixins - upgrading from 1.9 new module api -


in 1.9 code used objectmapper.getdeserializationconfig.addmixinannotations , objectmapper.getserializationconfig.addmixinannotations. in 2.2 seems no longer possible , must done via modules. correct? in module looks register mix-ins both serializer , deserialization configurations. in code upgrading there more serializer configs deserializer configs , wondering if there way duplicate configuration in 2.2.

another way of stating question can add mixin's in 2.2 , specify apply serialization etc? or deserialization?

i got answer on jackson forum. had not gotten reply in few days , timing running out me in scenario posted here option.

my assumption 2.x dominant use case mix-ins apply both serialization , deserialization, , common method add them directly via objectmapper, or using module methods. underlying implementation changed try keep objects other mapper immutable; , unification of mix-in settings more result of (and general simplification) goal. if need separate mix-ins, best way construct separate objectmappers. although serializationconfig , deserializationconfig keep reference (potentially) different sets of mix-ins, don't see methods make use of this. also: if separation necessary, file feature request @ github issue tracker (for project jackson-databind). don't know off-hand how easy add support in, it's worth suggesting if need.the challenge @ implementation level mix-ins fundamental feature must set before actual serialization or deserialization (since affects way serializers/deserializers built; , due caching, effects last if mix-in set modified).


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -