You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a third-party class for which I want to write a mixin. The class has collection-valued properties for which it has regular getters, but no collection-valued setters. Instead, it has "add" methods to add the collection elements one by one. E.g.:
It would be nice if some variant of @JsonProperty could be used on addFoo(Foo) to tell Jackson that, when deserializing foos, it should add the elements one by one using addFoo(Foo).
The text was updated successfully, but these errors were encountered:
nmatt
changed the title
Support deserialization of array field usin elementwise addition method
Support deserialization of array field using elementwise addition method
Mar 16, 2017
in which case add() method will be used to append entries to existing value, instead of default overwriting.
This works for different kinds of types; for POJOs it would avoid new instance construction, similarly for Map.
I have a third-party class for which I want to write a mixin. The class has collection-valued properties for which it has regular getters, but no collection-valued setters. Instead, it has "add" methods to add the collection elements one by one. E.g.:
It would be nice if some variant of
@JsonProperty
could be used onaddFoo(Foo)
to tell Jackson that, when deserializingfoos
, it should add the elements one by one usingaddFoo(Foo)
.The text was updated successfully, but these errors were encountered: