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
// Bean public class MyBean { private Date now; public Date getNow() { return now; } public void setNow(Date now) { this.now = now; } @Override public String toString() { return "MyBean{" + "now=" + now + '}'; } }
// main public static void main(String[] args) { Map map = new HashMap(); map.put("now", "00000000"); // Hutool BeanUtil final MyBean bean = BeanUtil.mapToBean(map, MyBean.class, false, null); SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); System.out.println(fmt.format(bean.getNow())); System.out.println(JSON.toJSONString(bean)); }
Caused by: java.lang.NullPointerException at com.alibaba.fastjson2.writer.FieldWriterDate.writeDate(FieldWriterDate.java:298) at com.alibaba.fastjson2.writer.OWG_1_1_MyBean.write(Unknown Source) at com.alibaba.fastjson2.JSON.toJSONString(JSON.java:2756) ... 1 more
The text was updated successfully, but these errors were encountered:
fix serialize date if year < 0, for issue #1711
aaf3b18
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.39-SNAPSHOT/ 问题已修复,请帮忙用2.0.39-SNAPSHOT版本验证,2.0.39版本预计在8月27日前发布
Sorry, something went wrong.
https://github.com/alibaba/fastjson2/releases/tag/2.0.39 请用新版本
No branches or pull requests
问题描述
环境信息
重现步骤
相关日志输出
The text was updated successfully, but these errors were encountered: