Interface JsonTypeAdapter<T>
public interface JsonTypeAdapter<T>
Converts a value to and from its JSON form, for a field or class marked
JsonAdapter.
Both directions use the parsed form of JSON: null, a String, a
Boolean, a Number, a java.util.Map with String keys for an object
and a java.util.List for an array, nested as deeply as needed. A parser may
hand a number over as any Number subclass, so read one through
Number#longValue() or Number#doubleValue() rather than casting it to a
particular class.
Throw IllegalArgumentException from fromJson(Object) to refuse a value;
the generated code adds where in the document it was. T is the type
converted.
-
Method Summary
-
Method Details
-
toJson
-
fromJson
-