JavaOptionalAdapter
class JavaOptionalAdapter<T : Any>(wrappedAdapter: Adapter<T>) : Adapter<Optional<T>>
Content copied to clipboard
An adapter for Java's Optional. null
is deserialized as Optional.empty.
Constructors
Functions
Link copied to clipboard
open override fun fromJson(reader: JsonReader, customScalarAdapters: CustomScalarAdapters): Optional<T>
Content copied to clipboard
Link copied to clipboard
open override fun toJson( writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, value: Optional<T>)
Content copied to clipboard