toastal/either/3.6.3

Either.Decode

Provides a

JSON

Decoder for the Either type.

Definition

either : Decoder a -> Decoder b -> Decoder (Either a b)

Decode an Either from a

JSON

Value.

decodeString (either string int) "4" == Ok (Right 4)