If ImplicitPropertyName
is present, one-argument constructors with JsonCreator.Mode.DEFAULT
are treated differently than usual.
#4960
Labels
to-evaluate
Issue that has been received but not yet evaluated
Search before asking
Describe the bug
If there is an
ImplicitPropertyName
, it seems thatJsonCreator.Mode.PROPERTIES
is treated as the basis.Version Information
Both refer to the head of the branch.
Reproduction
Comment out
findImplicitPropertyName
so that it is treated asJsonCreator.Mode.DELEGATING
and the test will succeed.Expected behavior
Given that it is not an explicit name, I felt that the treatment of both could be the same.
Additional context
This was found in a research on the following comment
FasterXML/jackson-module-kotlin#846 (comment)
I was not sure if this behavior is a bug, but I submitted it because if it is fixed as a bug, the above issue may be fixed at the same time.
There also seems to be a way to treat it as
JsonCreator.Mode.DELEGATING
by making some changes to the reproduced code, at least in the2.17
branch.The
2.17
branch ofkotlin-module
should be handled the same way as the reproduced code, but the test does not fail (this behavior seems to have been changed destructively in2.18
, and FasterXML/jackson-module-kotlin#846 is the issue that reports it).Since it will take more time to investigate the cause of this behavior, let me first ask if the change in behavior with or without
ImplicitPropertyName
is the expected behavior.The text was updated successfully, but these errors were encountered: