Interface Decoder.Simple<A>

Type Parameters:
A - the type of object to decode
Enclosing interface:
Decoder<A>

public static interface Decoder.Simple<A>
Like a Decoder.Terminal, but deserializes from a Dynamic, which combines the serialized form and the DynamicOps for that form.
  • Method Summary

    Modifier and Type
    Method
    Description
    decode(Dynamic<T> input)
    Decodes an object from a serialized form
    default Decoder<A>
    Returns a new decoder with the logic of this object, discarding any remaining serialized data and combining the input format and serialized data.
  • Method Details

    • decode

      <T> DataResult<A> decode(Dynamic<T> input)
      Decodes an object from a serialized form
      Type Parameters:
      T - the type of the serialized form
      Parameters:
      input - the Dynamic, containing serialized data, to decode
      Returns:
      a DataResult containing the decoded object, or an error if the object could not be decoded
    • decoder

      default Decoder<A> decoder()
      Returns a new decoder with the logic of this object, discarding any remaining serialized data and combining the input format and serialized data.
      Returns:
      a new decoder with the logic of this object, discarding any remaining serialized data and combining the input format and serialized data