-
-
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
@JsonSetter affects serialization too #1519
Comments
Documentation may be wrong; I can review Javadocs to make it clear that none of annotations is strictly limited in scope -- some may only be relevant to one or the other, but none is intentionally separated. |
Let's suppose we have a variable A a = new A(1); With no annotations, If you add If, however, you rename Is this the expected behavior? |
@tfga yes. If this is not what you want, you need to add additional |
I don't understand... Why would |
@tfga SInce you feel the need to ask such questions, you really, should to read how system works. Serialization and deserialization are closely tied, and naming is something that concerns both. And existing name of method is of crucial importance: this is the implicit name used to connect things. Without such linkage (between It is true that there is redundancy currently in that And at this point this is as much time as I will spend on explaining the system. As per my earlier note, yes, result is as expected. Implicit |
According to the docs,
@JsonSetter
is supposed to affect only deserialization and allow for "asymmetric naming":But it's affecting serialization too. It's behaving like
@JsonProperty
.Jackson versions used:
Unit test:
The text was updated successfully, but these errors were encountered: