Closed clo-vis closed 2 years ago
Interesting. Sounds like a flaw.
Can reproduce the issue; added a failing test.
Ah. I think I know the root cause: existence of a few "well-known" annotation triggers equivalent of returning empty String for name for (de)serialization -- meaning "use default". But I think creator detection logic does not realize this (as it is abstracted behind AnnotationIntrospector
)... and that needs to change, somehow. Fix needs to be in jackson-databind
, but issue can be here for now.
Created https://github.com/FasterXML/jackson-databind/issues/2932 -- unlikely to be resolved for 2.12, hope to address in 2.13.
Was fixed in jackson-databind
2.12.0, actually.
If ParameterNamesModule is registered, { "a": 1, "b": 1 } can be deserialized to an instance of:
but not to an instance of:
unless you declare the property name again: