Skip to content

WRITE_DURATIONS_AS_TIMESTAMPS default value overriden in 2.9?  #2549

@dmandalidis

Description

@dmandalidis

Just faced a strange issue with jackson-2.10.1. I have an object mapper with:

.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)

In 2.9.x all Duration fields were serialized to their textual representation (e.g. PT10S) without me explicitly disabling SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS. Switching to 2.10, all Duration fields have started to be serialized with their numeric representation (e.g. 0.0) which according to javadoc was somehow expected since WRITE_DURATIONS_AS_TIMESTAMPS is enabled by default.

With 2.10, I have to explicitly disable SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS to restore the previous behaviour.

Not a real problem though, but I 'm wondering what has changed between 2.9.x and 2.10.x

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