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

Annotation to ignore all properties except the ones specified #15

Closed
cen1 opened this issue Apr 18, 2017 · 5 comments
Closed

Annotation to ignore all properties except the ones specified #15

cen1 opened this issue Apr 18, 2017 · 5 comments

Comments

@cen1
Copy link

cen1 commented Apr 18, 2017

I've been googling around and on SO but couldn't really find anything similar. Basically a lot of times I want something like @JsonIgnoreAllPopertiesExcept({"this_one", "and_this_one"}), so the opposite of @JsonIgnoreProperties. In real world usage scenarios, more often than not it seems that I need to ignore almost all properties from the child entity except a few. If my child entity has 20 properties, I have to write 15 names in @JsonIgnoreProperties but with this new annotation I could just specify the ones I want and all others should be ignored. Hopefully that makes sense.

@cowtowncoder
Copy link
Member

So, like this existing issue?

FasterXML/jackson-databind#1296

If so, yes, I grok and like the idea. Was hoping to work on it for 2.9, but unfortunately seems unlikely there's time.

@cen1
Copy link
Author

cen1 commented Apr 18, 2017

Yes, exactly like that. I'm glad the proposal already exists.

@cowtowncoder
Copy link
Member

Ok thank you verifying. I agree it is a good idea.

@RahulKwani
Copy link

Hi,

Is there any update on implementing the mentioned feature??

@cowtowncoder
Copy link
Member

@Rahulkesharwani as per earlier notes issue is:

FasterXML/jackson-databind#1296

and if there are updates, whoever works on issue should add notes to issue. I am not aware of any progress.

@FasterXML FasterXML locked and limited conversation to collaborators Oct 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants