-
-
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
Recursive @JsonUnwrapped
(child
with same type) fail: "No _valueDeserializer assigned"
#383
Comments
Added the unit tests under 'failing', problem can be reproduced. Not sure why initialization isn't handled, but at least can verify eventual fix with the test now. |
I tried again to figure out this problem, but without success. I can see that the deserializer is missing in the end, but not how or why; the problem is related to recursive nature of unwrapper, but exactly how is unclear. |
I also wonder if this is even supportable: I can see that serialization works, and prepends prefixes as expected. But since the way deserializers is created is to statically create new unwrappers, solving initial problem might just lead into infinite recursion. Then again, since serialization does work (which is actually surprising :) ), perhaps this is doable. |
Yeah, I think the fundamental issue is that it needs a deserializer for Given that this is only an issue with Then again, these assumptions could be wrong, in which case I remain Tatu Saloranta [email protected] writes:
|
Well, recursive serializers and deserializers work fine, in general -- there is explicit handling of this case so that construction is separate from resolution of handlers (serializers/deserializers) for fields and contents. But apparently handling of unwrapping for deserialization causes some linkage to be unbound (as unwrapped handler is typically copy of original thing, and perhaps this happens around resolution), leaving |
Any updates on this issue? Possible work arounds ? |
@artur-devs No updates; not sure if anything can be done about this. For now you can consider combination of |
@JsonUnwrapped
(child
with same type) fail: "No _valueDeserializer assigned"
Thanks for the fix @cowtowncoder! |
@tdavis better late than never! Thank you for reporting it. |
Consider the following POJO:
When attempting to deserialize JSON:
The deserialization fails at "child.age", with the following trace:
I know this has something to do with the fact that the root object and "child" are of the same type; if the types are different it works fine.
Using Jackson 2.3.1
The text was updated successfully, but these errors were encountered: