FasterXML / FasterXML/jackson-modules-java8

Add `JavaTimeFeature.ALLOW_DATES_AS_TIMESTAMPS`

未关闭
#171 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
date-time-config pr-welcome
主要语言
Java
星标
425
派生
124
PR 合并指标
30 天内没有已合并 PR

描述

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?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。