public class TemporalMoshiAdapter extends com.squareup.moshi.JsonAdapter<TemporalAccessor>
| Constructor and Description |
|---|
TemporalMoshiAdapter(Class<? extends TemporalAccessor> type,
String dateFormat)
构造
|
| Modifier and Type | Method and Description |
|---|---|
TemporalAccessor |
fromJson(com.squareup.moshi.JsonReader jsonReader) |
void |
toJson(com.squareup.moshi.JsonWriter jsonWriter,
TemporalAccessor src) |
public TemporalMoshiAdapter(Class<? extends TemporalAccessor> type, String dateFormat)
type - 时间类型dateFormat - 日期格式public void toJson(com.squareup.moshi.JsonWriter jsonWriter,
TemporalAccessor src)
throws IOException
toJson in class com.squareup.moshi.JsonAdapter<TemporalAccessor>IOExceptionpublic TemporalAccessor fromJson(com.squareup.moshi.JsonReader jsonReader) throws IOException
fromJson in class com.squareup.moshi.JsonAdapter<TemporalAccessor>IOExceptionCopyright © 2025. All rights reserved.