-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
@JsonIgnoreProperties
not working with @JsonValue
#3647
Comments
Correct: this is a limitation and combination does not work. I will leave this open as possible future enhancement if anyone has time and interest: I agree that it would make sense to support. But there is no on-going work in this area that I know of. |
@JsonIgnoreProperties
not working with @JsonValue
Hi @cowtowncoder. I'm currently looking into it, but I'm still familiarizing myself with the codebase and haven't found the best approach yet. Obviously, fields marked with both @JsonValue and @JsonIgnoreProperties separately and together require different code flows, so I could not find an overlapping method that could be used to deal with the combo. If you have any suggestions on where I should focus that could speed up development, I'd love to hear them! I'm open to feedback and appreciate any guidance you can provide. One of the challenges I'm facing is that, when serializing individual fields like Looking forward to hearing from you. |
@mukham12 I don't remember off-hand exactly where to look (if this was simple to do I might have worked on it earlier :) ). But there are 2 obvious things to try to look for (apologies if this is too obvious):
the trick, basically, would be to combine 2 things, to make |
Also, one other minor note: writing a (failing) unit test, to be added under |
Thanks a lot for the suggestions. I will keep looking into this and I am going to keep you posted. |
…work with @JsonValue
|
Forgot to close; included in 2.16.0-rc1. |
When serializing the class
Bar
using the defaultObjectMapper
The output is
I would expect it to be
Tested on version 2.13.1
The text was updated successfully, but these errors were encountered: