Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for prefix and suffix on @JsonAnySetter annotation #202

Open
alxxyz opened this issue Apr 8, 2022 · 3 comments
Open

Add support for prefix and suffix on @JsonAnySetter annotation #202

alxxyz opened this issue Apr 8, 2022 · 3 comments

Comments

@alxxyz
Copy link

alxxyz commented Apr 8, 2022

In our POJO we have 2 Map fields and both have keys prefixes.
So it will very help if @JsonAnySetter annotation will support some prefixes and suffixes.

class Request {

    @JsonAnySetter(prefix="loc_")
    private Map<String, String> location;
    
    @JsonAnySetter(prefix="u_")
    private Map<String, String> user;
}
@cowtowncoder
Copy link
Member

Contributions welcome!

@alxxyz
Copy link
Author

alxxyz commented Aug 2, 2022

@cowtowncoder can you please help to understand the flow to add this functionality?

  1. to create PR to change the @JsonAnySetter annotation
  2. to create PR in https://github.com/FasterXML/jackson-databind to test new functionality?

@cowtowncoder
Copy link
Member

@alxxyz Yes, jackson-databind has the annotation introspectors. Testing would probably require local snapshot builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants