Package org.eclipse.jetty.util.ajax
Class JSONDateConvertor
- java.lang.Object
-
- org.eclipse.jetty.util.ajax.JSONDateConvertor
-
- All Implemented Interfaces:
JSON.Convertor
public class JSONDateConvertor extends Object implements JSON.Convertor
Convert aDateto JSON. If fromJSON is true in the constructor, the JSON generated will be of the form {class="java.util.Date",value="1/1/1970 12:00 GMT"} If fromJSON is false, then only the string value of the date is generated.
-
-
Constructor Summary
Constructors Constructor Description JSONDateConvertor()JSONDateConvertor(boolean fromJSON)JSONDateConvertor(String format, TimeZone zone, boolean fromJSON)JSONDateConvertor(String format, TimeZone zone, boolean fromJSON, Locale locale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectfromJSON(Map map)voidtoJSON(Object obj, JSON.Output out)
-
-
-
Method Detail
-
fromJSON
public Object fromJSON(Map map)
- Specified by:
fromJSONin interfaceJSON.Convertor
-
toJSON
public void toJSON(Object obj, JSON.Output out)
- Specified by:
toJSONin interfaceJSON.Convertor
-
-