-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
Exception when using @JsonIdentityInfo #194
Comments
Had exactly the same problem. Workaround I really do not understand why but when making the id field nullable it is working. The field is filled correctly. I am not sure why Jackson complains about a missing value when there actually is a value to be deserialized and deserialization works correct in the end. Must be a bug? Anybody can have a look at this? |
+1 for this problem. Thank you @markuskreusch for the workaround, fixed my issue as well. |
We ran into this problem for quite a while. Here's a test case that demonstrates the problem, which is present in at least
|
Apparently this is still broken in jackson-databind 2.11.2 and fixed in 2.11.4. |
@masoncj Thanks for reporting the fix version. I'd like to add your test to our suite, would you fill it out and email a scan/photo of the result to info at fasterxml dot com? https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf |
Signed and sent. Thanks @dinomite. Another interesting version of this test would remove the default arg on |
CLA received, thanks! |
I'm trying to jsonize/de-jsonize a simple data object:
Here's the test case:
The test above works nicely, as expected. However, if I add an
@JsonIdentityInfo
to my data class, like so:... then the test case breaks with the following exception:
I really need to use
@JsonIdentityInfo
for my use case. I don't see what I might be doing wrong here, this is all standard Jackson business (at least in Java it is). It took me a good hour to find out what is even causing this exception.Am I missing something / doing something wrong? Or might this be a bug in the Kotlin-Jackson library? Any workarounds?
The text was updated successfully, but these errors were encountered: