read

open override fun read(in: JsonReader): Optional<E>

Deserializes JSON data into an Optional value.

If the JSON token is null, returns an empty Optional. Otherwise, delegates to the appropriate TypeAdapter to deserialize the contained value and wraps it in an Optional.

Return

An Optional containing the deserialized value, or empty if the JSON was null

Parameters

in The JsonReader to read the JSON data from