On Tue, May 7, 2019 at 4:41 PM <jmnarl...@gmail.com> wrote:
>
> Hi,
>
> I believe I have quite specific question. Is there a path in which I could 
> customize the Jackson deserializer in a way that for every unknown property 
> it would populates object internal map with it's value?
>
> Example: Simple Java POJO:
>
> class SomeEntity {
>   String attribute1;
>   String attribute2;
>
>   Map<String, Object> additionalAttributes;
> }
>
> I know that on high level Jackson allows me to either enable or disable 
> failing on unknown properties through FAIL_ON_UNKNOWN_PROPERTIES option, 
> though is there any extendable way to customize this behaviour?
>
> Thanks in advance.

Yes, this is what `@JsonAnySetter` would do; add that to
`additionalAttributes` and that should work (for fields requires
jackson 2.8; earlier only 2-argument setter method could be
annotated).

-+ Tatu +-

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To post to this group, send email to jackson-user@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/CAL4a10gRHBwQCh6Rqu%3DCq8mjGnA%2B9wyOvqGjCdku5uTg1tmzPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to