public final class Rfc3339DateJsonAdapter extends JsonAdapter<java.util.Date>
2015-09-26T18:23:50.250Z. To use, add this as an adapter for Date.class on your Moshi.Builder:
Moshi moshi = new Moshi.Builder()
.add(Date.class, new Rfc3339DateJsonAdapter())
.build();
JsonAdapter.Factory| Constructor and Description |
|---|
Rfc3339DateJsonAdapter() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Date |
fromJson(JsonReader reader) |
void |
toJson(JsonWriter writer,
java.util.Date value) |
failOnUnknown, fromJson, fromJson, fromJsonValue, indent, lenient, nonNull, nullSafe, serializeNulls, toJson, toJson, toJsonValuepublic java.util.Date fromJson(JsonReader reader) throws java.io.IOException
fromJson in class JsonAdapter<java.util.Date>java.io.IOExceptionpublic void toJson(JsonWriter writer, java.util.Date value) throws java.io.IOException
toJson in class JsonAdapter<java.util.Date>java.io.IOExceptionCopyright © 2018. All Rights Reserved.