toastal/either/3.2.0

NOTE: this package is not compatible with Elm 0.19.1

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)