adapter

open fun <T> adapter(type: Type): JsonAdapter<T>

Returns a JSON adapter for type, creating it if necessary.


open fun <T> adapter(type: Class<T>): JsonAdapter<T>
open fun <T> adapter(type: Type, annotationType: Class<out Annotation>): JsonAdapter<T>
open fun <T> adapter(type: Type, annotationTypes: Array<Class<out Annotation>>): JsonAdapter<T>
open fun <T> adapter(type: Type, annotations: Set<out Annotation>): JsonAdapter<T>


open fun <T> adapter(    type: Type,     annotations: Set<out Annotation>,     @Nullable fieldName: String): JsonAdapter<T>

Parameters

fieldName

An optional field name associated with this type. The field name is used as a hint for better adapter lookup error messages for nested structures.