-
-
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
@JsonIgnore
does not if together with @JsonProperty
or @JsonFormat
#3357
Comments
Hmmh. I am not sure if this is working properly or not: combination of I can see why it might be expected that |
Hmmmh. Interesting. At first I was unable to reproduce this, with simpler test like: static class IgnoreAndProperty3357 {
public int toInclude = 2;
@JsonIgnore
@JsonProperty
@JsonFormat
public int toIgnore = 3; in which But if I make field non-public, leave annotations, add a public getter, then the problem is reproduced. On short term I would recommend removing unhelpful I will however add a failing test for this problem since I do think that ideally even this combination should result in ignoral of the property. |
@JsonIgnore
does not if together with @JsonProperty
or @JsonFormat
Describe the bug
JsonIgnore is not work when with JsonProperty or JsonFormat。
code:
Version information
2.13.1
To Reproduce
test case:
result:
jackson vesion 2.13.1
// JsonIgnore, JsonFormat and JsonProperty all not work correct.
Expected behavior
need:
jackson vesion 2.13.1
The text was updated successfully, but these errors were encountered: