public static Person getInstance(String jsonVale) {
return
(Person)JSONObject.toBean(JSONObject.fromObject(jsonVale),Person.class);
}
changed to:
public static Person getInstance(String jsonVale) {
JSONUtils.getMorpherRegistry().registerMorpher(new
DateMorpher(new String[] {"MM/dd/yyyy HH:mm:ss"}) );
return
(Person)JSONObject.toBean(JSONObject.fromObject(jsonVale),Person.class);
}
i.e:
add a sentence of "JSONUtils.getMorpherRegistry().registerMorpher(new
DateMorpher(new String[] {"MM/dd/yyyy HH:mm:ss"}) );" to configure the
Morpher.
:),:) :),:) :),:),:):),:)