A
- The type that this decoder deserializes.public static interface Decoder.Simple<A>
Dynamic
, discarding any remaining
serialized data.
This interface is a combination of Decoder.Terminal
and Decoder.Boxed
, and allows one
to implement a Decoder
based on Decoder.parse(Dynamic)
.
Modifier and Type | Method and Description |
---|---|
<T> DataResult<A> |
decode(Dynamic<T> input)
Completely decodes an object from the given
Dynamic data. |
default Decoder<A> |
decoder()
Returns a
Decoder that performs the same actions as this simple decoder. |
<T> DataResult<A> decode(Dynamic<T> input)
Dynamic
data. Any remaining serialized data is
discarded.T
- The type of the serialized form.input
- The serialized data.DataResult
containing the decoded object.Decoder.parse(Dynamic)
default Decoder<A> decoder()
Decoder
that performs the same actions as this simple decoder.Decoder
that returns the result of
decode(Dynamic)
.Decoder
is implemented via Decoder.decode(DynamicOps, Object)
,
not via Decoder.parse(Dynamic)
.