Skip to content

WW-4428 Add java.time support to JSON plugin#1603

Open
lukaszlenart wants to merge 1 commit intomainfrom
feat/WW-4428-json-plugin-java-time-support
Open

WW-4428 Add java.time support to JSON plugin#1603
lukaszlenart wants to merge 1 commit intomainfrom
feat/WW-4428-json-plugin-java-time-support

Conversation

@lukaszlenart
Copy link
Member

Summary

  • Add serialization/deserialization support for 6 java.time types (LocalDate, LocalDateTime, LocalTime, ZonedDateTime, OffsetDateTime, Instant) using ISO-8601 defaults
  • Add Calendar deserialization support (was serialize-only)
  • @JSON(format="...") annotation works for per-field custom formats on all new types
  • Existing Date/Calendar serialization behavior unchanged

Fixes WW-4428

Test plan

  • Each java.time type serializes to expected ISO format
  • Each java.time type deserializes from ISO string
  • @JSON(format="dd/MM/yyyy") custom format works for serialization and deserialization
  • Calendar deserialization works
  • Null value handling for temporal types
  • Round-trip test: serialize → deserialize → assert equality
  • Existing Date/Calendar tests still pass (regression)

🤖 Generated with Claude Code

@lukaszlenart lukaszlenart force-pushed the feat/WW-4428-json-plugin-java-time-support branch 5 times, most recently from 47b8421 to 66a6201 Compare February 28, 2026 08:43
@lukaszlenart lukaszlenart marked this pull request as ready for review February 28, 2026 11:02
…upport

- Add serialization support for LocalDate, LocalDateTime, LocalTime,
  ZonedDateTime, OffsetDateTime, and Instant in DefaultJSONWriter
- Add deserialization support for the same types in JSONPopulator
- Support @JSON(format=...) custom formats for all temporal types
- Fix Instant custom-format serialization requiring UTC zone
- Add Calendar serialization/deserialization via temporal bridge
- Add comprehensive tests for all temporal types including custom
  formats, malformed input, and null handling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lukaszlenart lukaszlenart force-pushed the feat/WW-4428-json-plugin-java-time-support branch from 66a6201 to 488e9d2 Compare March 6, 2026 07:15
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 6, 2026

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.

1 participant