I need to to deserialize json property (field) absolutely my way using org.codehaus.jackson. I know about custom @JsonDeserializer option, but this is only useful, if you need to deserialize given values of array. I need to deserialize values of array and array itself. To be concrete I need to deserialize ForreignCollection from ORMLite, so I should be able to programatically create ForeignCollectionField and add values into it.
@JsonProperty
@ForeignCollectionField
private ForeignCollection<PerformerLocalized> localized;
Are there any ideas, how to manage it?
@JsonDeserializecan be used BOTH container AND values, like so:note that normally
Collectiondeserializers do not deal with values, but just delegate it (to make things nicely modular). But you can obviously choose differently with your deserializer; either delegate or directly deal with. If you want to delegate, you probably want to implementContextualDeserializerinterface, to be able to resolve delegatee deserializers.