at method

Decoder<A> at(
  1. String key
)

/////////////////////////////////////////////////////////////////////////// ///////////////////////////// Combinators ///////////////////////////////// ///////////////////////////////////////////////////////////////////////////

Implementation

Decoder<A> at(String key) => this.key.fold(
      () => Decoder._keyed(some(key), _decodeF),
      (_) => Decoder.object.at(key).emap((json) => decode(json)),
    );