Skip to content

Add Jackson temporal format parity tests#1342

Merged
dstepanov merged 2 commits into
3.1.xfrom
more-test
Jun 11, 2026
Merged

Add Jackson temporal format parity tests#1342
dstepanov merged 2 commits into
3.1.xfrom
more-test

Conversation

@dstepanov

Copy link
Copy Markdown
Contributor

Implemented Jackson parity for additional date/time types in Micronaut Serialization.

Added support/registration for:

  • java.time.YearMonth
  • java.time.MonthDay
  • java.time.Month
  • java.sql.Time

Extended existing behavior/tests for:

  • OffsetTime
  • ZoneOffset
  • TimeZone
  • Calendar
  • GregorianCalendar

Main behavior updates:

  • @JsonFormat shape handling now covers the missing temporal types.
  • Array/numeric temporal forms mirror Jackson where applicable.
  • Deserialization now mirrors serialization shape selection directly, using array/scalar decoders instead of decodeArbitrary.
  • java.sql.Time is tested for scalar shapes only because Jackson does not treat ARRAY as a normal temporal array for it.

@dstepanov dstepanov requested a review from graemerocher June 11, 2026 12:29
Comment thread serde-support/src/main/java/io/micronaut/serde/support/serdes/SqlTimeSerde.java Outdated
Comment thread serde-support/src/main/java/io/micronaut/serde/support/serdes/YearMonthSerde.java Outdated
Remove redundant nullable deserializer overrides that match the default implementation.
@sonarqubecloud

Copy link
Copy Markdown

@dstepanov dstepanov merged commit ef8633d into 3.1.x Jun 11, 2026
13 checks passed
@dstepanov dstepanov deleted the more-test branch June 11, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants