Skip to content

Jackson Serialization for Duration is broken since Spring Boot 2.2 upgrade #19345

@filiphr

Description

@filiphr

Jackson added a breaking change for the way Duration is serialized. Before The DurationSerializer was using SerializationFeature.WRITE_DATES_AS_TIMESTAMPS to check whether Duration should be serialized as a timestamp or not. Since 2.10 Jackson uses SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS to check whether Duration should be serialized as a timestamp or not.

I would suggest that the JacksonAutoConfiguration adds SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS with a value false as a default configuration.

This was done in FasterXML/jackson-modules-java8#75

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by anothertype: regressionA regression from a previous release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions