OptionalAdapter

class OptionalAdapter<T>(wrappedAdapter: Adapter<T>) : Adapter<Optional.Present<@JvmSuppressWildcards T>>

Constructors

Link copied to clipboard
fun <T> OptionalAdapter(wrappedAdapter: Adapter<T>)

Functions

Link copied to clipboard
open override fun fromJson(reader: JsonReader, customScalarAdapters: CustomScalarAdapters): Optional.Present<T>

Deserializes the given Json to the expected Kotlin type.

Link copied to clipboard
open override fun toJson(    writer: JsonWriter,     customScalarAdapters: CustomScalarAdapters,     value: Optional.Present<T>)

Serializes a Kotlin type into its equivalent Json representation.