Optional Adapter
class OptionalAdapter<T>(wrappedAdapter: Adapter<T>) : Adapter<Optional.Present<@JvmSuppressWildcards T>>
Content copied to clipboard
ResponseAdapters can only express something that's present. Absent values are handled outside of the adapter
Constructors
Functions
Link copied to clipboard
open override fun fromJson(reader: JsonReader, customScalarAdapters: CustomScalarAdapters): Optional.Present<T>
Content copied to clipboard
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>)
Content copied to clipboard
Serializes a Kotlin type into its equivalent Json representation.