-
-
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
The KeyDeserializer
specified in the class with @JsonDeserialize(keyUsing = ...)
is overwritten by the KeyDeserializer
specified in the ObjectMapper
.
#4444
Comments
Sounds like a bug indeed. |
@cowtowncoder jackson-databind/src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java Lines 1272 to 1289 in 681e399
Although it seems that the acquisition from the annotation should be given priority, in this processing order, the result acquired from |
I am not too sure, but I have issued a pull request to fix this. |
Thank you @k163377 -- I think fix is correct & clean, will proceed with it! |
Fixed in 2.18 for 2.18.3 |
Search before asking
Describe the bug
SSIA
Also, the attached
Java
reproduction code is directly addingKeyDeserializer
toSimpleModule
, but it seemed to be reproduced when usingKeyDeserializers
.Version Information
Reproduced in the latest 2.17 branch(fe42cf7).
Also, 2.16.1 seems to have the same problem.
Reproduction
Expected behavior
Like
JsonDeserializer
, theKeyDeserializer
specified for the class must be used.Additional context
This problem was discovered during prototyping to solve FasterXML/jackson-module-kotlin#777.
ProjectMapK/jackson-module-kogera#224
I'm not sure if I should merge it into
kotlin-module
as it is, since the default content provided byKotlinModule
overrides any user customization.The text was updated successfully, but these errors were encountered: