Skip to content

Conversation

filiphr
Copy link
Contributor

@filiphr filiphr commented Dec 11, 2019

Jackson added a breaking change in 2.10 for the way Duration is serialized.
Before that 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.

This commit aligns the default for SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS
with the default for SerializationFeature.WRITE_DATES_AS_TIMESTAMPS

The change in Jackson was done in FasterXML/jackson-modules-java8#75

fixes gh-19345

… default

Jackson added a breaking change in 2.10 for the way Duration is serialized.
Before that 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.

This commit aligns the default for SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS
with the default for SerializationFeature.WRITE_DATES_AS_TIMESTAMPS

The change in Jackson was done in FasterXML/jackson-modules-java8#75

fixes spring-projectsgh-19345
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 11, 2019
@wilkinsona wilkinsona added type: regression A regression from a previous release and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 12, 2019
@wilkinsona wilkinsona added this to the 2.2.x milestone Dec 12, 2019
@snicoll snicoll self-assigned this Dec 22, 2019
@snicoll snicoll modified the milestones: 2.2.x, 2.2.3 Dec 22, 2019
@snicoll snicoll closed this in 8c8ee32 Dec 22, 2019
@filiphr filiphr deleted the jackson-duration-regression branch December 22, 2020 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jackson Serialization for Duration is broken since Spring Boot 2.2 upgrade
4 participants