public class JSONDateConvertor extends java.lang.Object implements JSON.Convertor
Date
to 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 and Description |
---|
JSONDateConvertor() |
JSONDateConvertor(boolean fromJSON) |
JSONDateConvertor(java.lang.String format,
java.util.TimeZone zone,
boolean fromJSON) |
JSONDateConvertor(java.lang.String format,
java.util.TimeZone zone,
boolean fromJSON,
java.util.Locale locale) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
fromJSON(java.util.Map map) |
void |
toJSON(java.lang.Object obj,
JSON.Output out) |
public JSONDateConvertor()
public JSONDateConvertor(boolean fromJSON)
public JSONDateConvertor(java.lang.String format, java.util.TimeZone zone, boolean fromJSON)
public JSONDateConvertor(java.lang.String format, java.util.TimeZone zone, boolean fromJSON, java.util.Locale locale)
public java.lang.Object fromJSON(java.util.Map map)
fromJSON
in interface JSON.Convertor
public void toJSON(java.lang.Object obj, JSON.Output out)
toJSON
in interface JSON.Convertor
Copyright © 1995–2023 Webtide. All rights reserved.