Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add `JavaTimeFeature.ALLOW_DATES_AS_TIMESTAMPS`

未关闭
#171 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
java
领域
backend

调研方向

首先阅读 JavaTimeFeature,以及现有的针对 Java 时间值的 SerializationFeature、DeserializationFeature 和 MapperFeature 处理。确定哪个提议的配置最能表达拒绝数字日期和时间输入,同时保留 ISO 8601 字符串。完成的标准是:数字输入(如 123456789)会抛出异常,并且所述的 ISO 8601 值仍被接受,同时为所选行为提供覆盖。

由索引模型根据 Issue 内容生成。

描述

date-time-config pr-welcome

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?

主要语言
Java
星标
425
派生
125
平均合并
19 分钟
30 天内合并 PR
1

贡献指南

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

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

FasterXML/jackson-modules-java8 的其他 Issue

查看 FasterXML/jackson-modules-java8 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

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