deser

19 Aug: How to map unknown JSON properties with Jackson?

For a current project, I need to map a JSON object that have some known fields, and some “dynamics” fields. I don’t want to ignore these fields, just to get them in a map inside my bean. After digging for 20 minutes, I finally found the right annotations to use: @JsonAnyGetter and @JsonAnySetter. @JsonAnySetter is a simple marker that can be used to define a two-argument method (first argument name of property, second value to set), to…