Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
@JsonProperty-ies are ignored on @JsonCreator and getters are used instead, and inconsistent behavior with ParameterNamesModule module #1924
There are possibly two different separate things, but at least makes sense to file them together for now to discuss. Not sure whether the first case is the expected/known behavior, or bug, but also, please see to the second case, that it is somehow related.
Consider the following class:
and the test class:
So, when trying to deserialize
Although, and this is the second case, if enable
On Jackson 2.7.5, 2.8.10, 2.8.11 it fails with:
On the latest Jackson 2.9.4 it fails as well, but the error is different:
So, my expectation is that also without
These are the dependencies used:
where I've tried with 2.7.5, 2.8.10, 2.8.11, and 2.9.4 as the
One quick note:
As to problem itself, that is quite interesting; but I'd like to see
@cowtowncoder you are right. I've tried the isolated project with only Jackson dependencies there, and with the
So, what we have now is that explicit
Ok. So if I understand situation correctly, it is possible that one setting might help:
which is enabled by default (for backwards compatibility); disabling that might help here.
and finally, in some cases adding ignoral for undesired names may also hide exception: ignoring meaning roughly "it's fine if these are seen but just ignore them".
I hope this helps.