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
如标题,fastjson1.x 版本切换到2.x版本时,出现业务对象date属性字段的数据反序列化异常
示例代码:
//可在此输入示例代码 public class DateTest { public static class DataDemo { private Date createTime; public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } } public static void main(String[] args) { String json1 = "{\"createTime\":\"2023-04-06 12:48:11\"}"; String json2 = "{\"createTime\":\"20230406124811\"}"; DataDemo fastJson1DataDemo1 = com.alibaba.fastjson.JSONObject.parseObject(json1, DataDemo.class); DataDemo fastJson1DataDemo2 = com.alibaba.fastjson.JSONObject.parseObject(json2, DataDemo.class); DataDemo fastJson2DataDemo1 = com.alibaba.fastjson2.JSONObject.parseObject(json1, DataDemo.class); DataDemo fastJson2DataDemo2 = com.alibaba.fastjson2.JSONObject.parseObject(json2, DataDemo.class); System.out.println("ok"); } }
对您期望发生的结果进行清晰简洁的描述。 期望与fastjson 1.x保持一致
The text was updated successfully, but these errors were encountered:
这个要兼容起来还是有些纠结,我再想想哈
Sorry, something went wrong.
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.28-SNAPSHOT/ 问题已修复,请帮忙有2.0.8-SNAPSHOT版本验证,2.0.28版本预计会在周末发布
readDate support 'yyyyMMddHHmmss' format, for issue #1326
df7993c
https://github.com/alibaba/fastjson2/releases/tag/2.0.28 请用新版本
已验证ok,谢谢
No branches or pull requests
问题描述
如标题,fastjson1.x 版本切换到2.x版本时,出现业务对象date属性字段的数据反序列化异常
环境信息
重现步骤
示例代码:
期待的正确结果
对您期望发生的结果进行清晰简洁的描述。
期望与fastjson 1.x保持一致
The text was updated successfully, but these errors were encountered: