public final class DefaultOnDataMismatchAdapter<T>
extends com.squareup.moshi.JsonAdapter<T>
| Modifier and Type | Method and Description |
|---|---|
T |
fromJson(com.squareup.moshi.JsonReader reader) |
static <T> com.squareup.moshi.JsonAdapter.Factory |
newFactory(java.lang.reflect.Type type,
T defaultValue)
Builds an adapter that fallbacks to a default value in case there's a mismatch.
|
void |
toJson(com.squareup.moshi.JsonWriter writer,
T value) |
java.lang.String |
toString() |
public T fromJson(com.squareup.moshi.JsonReader reader) throws java.io.IOException
fromJson in class com.squareup.moshi.JsonAdapter<T>java.io.IOExceptionpublic void toJson(com.squareup.moshi.JsonWriter writer,
T value)
throws java.io.IOException
toJson in class com.squareup.moshi.JsonAdapter<T>java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic static <T> com.squareup.moshi.JsonAdapter.Factory newFactory(java.lang.reflect.Type type,
T defaultValue)