Skip to content

Empty options serialize to null since 2.7.4 #280

@ieure

Description

@ieure

I tried to upgrade Jackson in my Scala project today, and was met with several failing tests. I tracked this down to a behavior change from jackson-module-scala 2.7.3 -> 2.7.4. The issue is that empty Options now serialize to null. Prior to 2.7.3, they would be omitted from the output JSON.

Here's a project with a minimal failing testcase: https://github.com/ieure/jackson-scala-testcase

Based on this being an change in Option behavior & starting with 2.7.4, I suspect #252 is related to the breakage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions