public class DateGsonTypeAdapter extends Object implements GsonTypeAdapter<Date>
| Modifier and Type | Field and Description |
|---|---|
static DateGsonTypeAdapter |
INSTANCE
默认日期格式化描述,默认为null,表示使用时间戳
|
| Constructor and Description |
|---|
DateGsonTypeAdapter(String dateFormat)
构造
|
| Modifier and Type | Method and Description |
|---|---|
Date |
deserialize(com.google.gson.JsonElement json,
Type typeOfT,
com.google.gson.JsonDeserializationContext context) |
com.google.gson.JsonElement |
serialize(Date src,
Type typeOfSrc,
com.google.gson.JsonSerializationContext context) |
public static final DateGsonTypeAdapter INSTANCE
public DateGsonTypeAdapter(String dateFormat)
dateFormat - 日期格式Copyright © 2025. All rights reserved.