net.sf.json.processors
Class JsDateJsonBeanProcessor

java.lang.Object
  extended by 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

Constructor Summary
JsDateJsonBeanProcessor()
           
 
Method Summary
 JSONObject processBean(Object bean, JsonConfig jsonConfig)
          Processes the input bean into a compatible JsDate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsDateJsonBeanProcessor

public JsDateJsonBeanProcessor()
Method Detail

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 bean
jsonConfig - the current configuration environment
Returns:
a JSONObject that represents the input bean