net.sf.json.processors
Class JsDateJsonBeanProcessor
java.lang.Object
net.sf.json.processors.JsDateJsonBeanProcessor
- All Implemented Interfaces:
- JsonBeanProcessor
public class JsDateJsonBeanProcessor
- extends Object
- implements JsonBeanProcessor
Transforms a java.util.Date into a JSONObject ideal for JsDate conversion.
Example:
{
"minutes": 13,
"seconds": 14,
"hours": 12,
"month": 5,
"year": 2007,
"day": 17,
"milliseconds": 150
}
- Author:
- Andres Almiray
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsDateJsonBeanProcessor
public JsDateJsonBeanProcessor()
processBean
public JSONObject processBean(Object bean,
JsonConfig jsonConfig)
- Processes the input bean into a compatible JsDate.
- Specified by:
processBean
in interface JsonBeanProcessor
- Parameters:
bean
- the input beanjsonConfig
- the current configuration environment
- Returns:
- a JSONObject that represents the input bean