We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yyyyMMddHHmmssSSS格式字符串转LocalDateTime失败,有横线的格式能成功,但fastjson1两种格式都可以
请填写以下信息:
执行下面代码可重现
public class Fastjson2Test { @Test public void test(){ // yyyyMMddHHmmssSSS String data = "{\"date\":\"2022-08-12\",\"createTime\":\"20220812214301538\"}"; //String data = "{\"date\":\"2022-08-12\",\"createTime\":\"2022-08-12 21:43:01.538\"}"; DateTime dateTime = JSONObject.parseObject(data, DateTime.class); System.out.println(dateTime.toString()); } public static class DateTime{ private LocalDate date; private LocalDateTime createTime; @Override public String toString() { return "DateTime{" + "date=" + date + ", createTime=" + createTime + '}'; } public LocalDate getDate() { return date; } public void setDate(LocalDate date) { this.date = date; } public LocalDateTime getCreateTime() { return createTime; } public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; } } }
都支持
The text was updated successfully, but these errors were encountered:
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.23-SNAPSHOT/ 问题已修复,请用2.0.23版本帮忙验证,2.0.23版本预计在1月14日前发布
Sorry, something went wrong.
@wenshao 2.0.23-SNAPSHOT版经测试已修复,待正式发版后再次确认下。
https://github.com/alibaba/fastjson2/releases/tag/2.0.23 问题已经修复,请用新版本
thx,good job
No branches or pull requests
问题描述
yyyyMMddHHmmssSSS格式字符串转LocalDateTime失败,有横线的格式能成功,但fastjson1两种格式都可以
环境信息
请填写以下信息:
重现步骤
执行下面代码可重现
期待的正确结果
都支持
The text was updated successfully, but these errors were encountered: