Files

13 lines
1.3 KiB
Plaintext

== old Jackson 2 payload, read by Jackson 3 defaults
{"meeting":{"day":[2026,12,15],"wallClock":[2026,12,15,10,30],"createdAt":1797310800.000000000,"startsAt":1797310800.000000000,"reminderAt":1797310800.000000000},"length":5400.000000000,"month":"DECEMBER"}
OK Job[meeting=Meeting[day=2026-12-15, wallClock=2026-12-15T10:30, createdAt=2026-12-15T05:00:00Z, startsAt=2026-12-15T05:00Z, reminderAt=2026-12-15T05:00Z], length=PT1H30M, month=DECEMBER]
== new Jackson 3 payload, read by a Jackson 2 consumer (defaults + module)
{"meeting":{"day":"2026-12-15","wallClock":"2026-12-15T10:30:00","createdAt":"2026-12-15T05:00:00Z","startsAt":"2026-12-15T10:30:00+05:30","reminderAt":"2026-12-15T10:30:00+05:30"},"length":"PT1H30M","month":12}
FAIL InvalidFormatException: Cannot deserialize value of type `java.time.Month` from number 12: index value outside legal index range [0..11]
== Jackson 3 told to keep writing the Jackson 2 shapes
{"meeting":{"day":[2026,12,15],"wallClock":[2026,12,15,10,30],"createdAt":1797310800.000000000,"startsAt":1797310800.000000000,"reminderAt":1797310800.000000000},"length":5400.000000000,"month":12}
identical to the Jackson 2 payload : false
FAIL InvalidFormatException: Cannot deserialize value of type `java.time.Month` from number 12: index value outside legal index range [0..11]