FasterXML / FasterXML/jackson-modules-java8

Add `JavaTimeFeature.ALLOW_DATES_AS_TIMESTAMPS`

Đang mở
#171 5 bình luận 1 reaction 0 người được giao Xem trên GitHub
date-time-config pr-welcome
Ngôn ngữ chính
Java
Star
425
Fork
124
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

With SerializationFeature.WRITE_DATES_AS_TIMESTAMPS it's possible to output date and time data as ISO 8601, but there seems to be no way to only accept date and time data in ISO 8601 format.

Though I'd suggest to add some kind of `DeserializationFeature.ALLOW_DATES_AS_TIMESTAMPS` or `MapperFeature.ALLOW_COERCION_OF_DATES` which disables the coercion of date and time data.

In other words: `{"myInstant": 123456789}` should throw an exception, and only `{"myInstant": "1973-11-29T21:33:09Z"}` should be allowed.

Or is there already an setting that I missed?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.