-
-
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
JsonUnwrapped not working properly with ConstructorProperties #1274
Comments
Hmmh. That is odd. Basically name of unwrapped property should be mostly ignored (it's a placeholder really). Well, sort of; I guess in this case it is unfortunately needed to link the logical property, passed via constructor. So I guess this is a problem. There are some observed issues with linking creator properties to non-creator properties, related to resolution of creator properties, and the whole system needs to be rewritten. But due to complexity that will be done at earliest for 2.9. So your work-around is good to have for now., |
I found same issue, debugging show that, |
But i see that usage of right? |
@wayerr Most likely yes. Ideally it should be supported, eventually, but probably not before 3.x. The current implementation of unwrapped properties can not be made to support this reliably. |
I think there is another issue noting problems between |
@cowtowncoder Can you link to that other issue? |
So: #1467 is the remaining "main" issue. |
After migrating to Jackson 2.7.5 from Jackson 2.6 I found weird interaction between JsonUnwrapped and ConstructorProperties. See following test.
Just for clarity, after delomboking, value objects have following definitions:
Running test gives stack trace:
I found workaround for this problem. I need to add
@JsonProperty
annotation to field annotated with@JsonUnwrapped
:With this addition test passes. However it would be nice if
@JsonPropery
is not needed here.The text was updated successfully, but these errors were encountered: