Add a function to reduce the boilerplate involved in decoding {ok, Success} and {error, Failure} tuples (that's {:ok, success} and {:error, failure} in Elixir).
There are variants of this kind of data that it might be helpful to have helpers for decoding too, e.g.
ok | error
{ok, Success} | error
ok | {error, Failure}
But I think that this is the most common one? Hopefully the potential value of other helper decoders can be assessed through use and user feedback!
Add a function to reduce the boilerplate involved in decoding
{ok, Success}
and{error, Failure}
tuples (that's{:ok, success}
and{:error, failure}
in Elixir).There are variants of this kind of data that it might be helpful to have helpers for decoding too, e.g.
But I think that this is the most common one? Hopefully the potential value of other helper decoders can be assessed through use and user feedback!