Public 成员函数 | |
| DefaultDateTypeAdapter (int dateStyle, int timeStyle) | |
| JsonElement | serialize (Date src, Type typeOfSrc, JsonSerializationContext context) |
| Date | deserialize (JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException |
| String | toString () |
Public 成员函数 继承自 com.google.gson.JsonSerializer< T > | |
| JsonElement | serialize (T src, Type typeOfSrc, JsonSerializationContext context) |
包函数 | |
| DefaultDateTypeAdapter () | |
| DefaultDateTypeAdapter (String datePattern) | |
| DefaultDateTypeAdapter (int style) | |
| DefaultDateTypeAdapter (DateFormat enUsFormat, DateFormat localFormat) | |
Private 成员函数 | |
| Date | deserializeToDate (JsonElement json) |
Private 属性 | |
| final DateFormat | enUsFormat |
| final DateFormat | localFormat |
| final DateFormat | iso8601Format |
This type adapter supports three subclasses of date: Date, Timestamp, and java.sql.Date.
|
inlinepackage |
|
inlinepackage |
|
inlinepackage |
|
inline |
|
inlinepackage |
|
inline |
Gson invokes this call-back method during deserialization when it encounters a field of the specified type.
In the implementation of this call-back method, you should consider invoking JsonDeserializationContext#deserialize(JsonElement, Type) method to create objects for any non-trivial field of the returned object. However, you should never invoke it on the the same type passing
since that will cause an infinite loop (Gson will call your call-back method again).
| json | The Json data being deserialized |
| typeOfT | The type of the Object to deserialize to |
| JsonParseException | if json is not in the expected format of typeofT
|
|
inlineprivate |
|
inline |
|
inline |
|
private |
|
private |
|
private |
1.8.8