-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
@JsonInclude content inclusion does not work #346
Comments
Willing to work on this if someone could point me in the right direction. Thanks! |
Looks like this broke in 2.9 Works fine with 2.8.10 using |
@jefftt Ok, so What are unexpected outputs for these tests? |
Sorry for not being clear: An example case class: In 2.9.x: |
Ok. So for some reason filtering criteria matches in this case. Standard reference type deserializer:
has implementations for Java 8 and Guava |
I hit this issue recently and was looking into a fix. It was relatively straightforward to get it working by changing the However, after making this change three of the other test cases started failing. Specifically the three tests for using
As a sanity check I also added a test to see what the java8 module would do with an
Any ideas as to how to go about fixing this? |
Hmmh. I am not 100% sure if collection of polymorphic values via Option(al) is tested properly, so it is possible this could be a subtle bug in One thing I could do regarding first possibility would be if this could be reproduce with |
I'll try to reproduce with |
@brharrington Ok that makes sense. I'd still like test that can be included directly in |
Based on request on jackson-module-scala issue, here is a test case showing the problem directly on jackson-databind. For context: FasterXML/jackson-module-scala#346 (comment)
@cowtowncoder Here is a test case on |
@brharrington This issue affects us as well; thank you for getting to the bottom of it. It looks like your fix using |
As far as I know that is the only blocker. |
@david-convey @brharrington Fwtw I was able to fix the issue on There is still #357 that blocks Scala module release, but it would be good if this could be verified from Scala module side. |
@cowtowncoder I confirmed that using a jackson-databind jar built with the fix for #1673 fixes the test cases that were failing. |
@brharrington Thank you. I will then close this issue, assuming it would work for |
@cowtowncoder This issue is different and would still need a change (brharrington/jackson-module-scala@f6448e8). But the fix to jackson-databind means that the proposed fix to this issue will not break other use-cases. I can submit a PR once 2.9.4 is used by jackson-module-scala. |
Ah. So a patch is needed to change Scala |
Fixes FasterXML#346. Note this also update the jackson version to 2.9.4 as it has a fix that is needed to avoid breaking other tests. See FasterXML/jackson-databind#1673 for more details.
Jackson version 2.9.1
I would like to serialized
Some(List.empty)
to[]
The text was updated successfully, but these errors were encountered: