adapter

inline fun <T> Moshi.adapter(): JsonAdapter<T>

Return

a JsonAdapter for T, creating it if necessary. Note that while nullability of T itself is handled, nested types (such as in generics) are not resolved.

fun <T> Moshi.adapter(ktype: KType): JsonAdapter<T>

Return

a JsonAdapter for ktype, creating it if necessary. Note that while nullability of ktype itself is handled, nested types (such as in generics) are not resolved.