Skip to content
Discussion options

You must be logged in to vote

Annotation that might work would be @JsonAnySetter for Map or ObjectNode like so (from AnySetterForCreator562Test.java):

   class POJO562
    {
        String a;
        Map<String,Object> stuff;

        @JsonCreator
        public POJO562(@JsonProperty("a") String a,
            @JsonAnySetter Map<String, Object> leftovers
        ) {
            this.a = a;
            stuff = leftovers;
        }
    }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fbiville
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants