FasterXML / jackson-modules-java8

Set of support modules for Java 8 datatypes (Optionals, date/time) and features (parameter names)
Apache License 2.0
398 stars 116 forks source link

Only `DateTimeFormatter.ISO_OFFSET_DATE_TIME` accepted by `ZonedDateTimeKeyDeserializer` #306

Closed caluml closed 5 months ago

caluml commented 5 months ago

Hello.

Is there any reason for specifying DateTimeFormatter.ISO_OFFSET_DATE_TIME as the format for parsing ZonedDateTimes in ZonedDateTimeKeyDeserializer?

This prevents valid ZonedDateTime keys from being deserialised.

If the second parameter to .parse isn't specified, then all formats supported by .parse are allowed.

I have raised a PR to change this: https://github.com/FasterXML/jackson-modules-java8/pull/305

cowtowncoder commented 5 months ago

I do not remember if there is any specific reason: I assume whoever added it (could have been me :) ) copied setting from non-key handling. PR looks good, will add some notes.