JSON格式里面时间toBean的时候出错
错误提示:
WARN - JSONObject.morphPropertyValue(1474) | Can't transform property 'mms_moban_create_time' from java.lang.String into java.util.Date. Will register a default Morpher
INFO - BeanMorpher.morph(98) | Property 'java.util.Date.class' has no write method. SKIPPED.
WARN - BeanMorpher.morph(116) | Property 'java.lang.String.date' does not exist. SKIPPED.
INFO - BeanMorpher.morph(98) | Property 'java.util.Date.day' has no write method. SKIPPED.
WARN - BeanMorpher.morph(116) | Property 'java.lang.String.hours' does not exist. SKIPPED.
WARN - BeanMorpher.morph(116) | Property 'java.lang.String.minutes' does not exist. SKIPPED.
WARN - BeanMorpher.morph(116) | Property 'java.lang.String.month' does not exist. SKIPPED.
WARN - BeanMorpher.morph(116) | Property 'java.lang.String.seconds' does not exist. SKIPPED.
WARN - BeanMorpher.morph(116) | Property 'java.lang.String.time' does not exist. SKIPPED.
INFO - BeanMorpher.morph(98) | Property 'java.util.Date.timezoneOffset' has no write method. SKIPPED.
WARN - BeanMorpher.morph(116) | Property 'java.lang.String.year' does not exist. SKIPPED.
JSON代码:
deleteMmss [{"mms_moban_id":45,"mms_moban_name":"trytryrt","mms_moban_type":"","mms_moban_create_user":"lenj","mms_moban_create_time":"2013-08-21T09:47:09"}]
代码:
public String DeleteMmsID()throws Exception{
JSONArray jsonArray = JSONArray.fromObject(deleteMmss);
List<T_MMS_MOBAN> deleteMmss = new ArrayList<T_MMS_MOBAN>();
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);
//JSONUtils.getMorpherRegistry().registerMorpher(new DateMorpher(new String[] {"yyyy-MM-dd"}) );
deleteMmss.add((T_MMS_MOBAN)JSONObject.toBean(jsonObject, T_MMS_MOBAN.class));
}
selectMmsSerivce.batchDelete("MMS.delete_t_mms_moban", deleteMmss);
success = true;
return SUCCESS;
}
请问这个错误该如何修改呢?