【发布时间】:2012-05-29 06:40:30
【问题描述】:
我有以下 JSON 对象:
{"startDate":"30/01/2008","startPeriod":"2008","dboid":"5308204301485575800000","action":"update","grid":"variantAssigGrid","endDate ":"30/01/2011","endPeriod":"2011","机构":"5301004301485575300000"}
应用 JSONObject.toBean 后,开始和结束日期设置为结果 bean 中的当前系统日期(而不是 json 字符串中的值)。看起来它们是用 new Date() 初始化的。
有没有办法指定日期格式?我查看了 JsonConfig 类,但没有取得多大成功。
提前致谢!
【问题讨论】:
-
先检查你的配置!