diff --git a/lib/poison/decoder.ex b/lib/poison/decoder.ex index caab69d..8926fba 100644 --- a/lib/poison/decoder.ex +++ b/lib/poison/decoder.ex @@ -108,11 +108,14 @@ defprotocol Poison.Decoder do @typep as :: map | struct | [as] - @type options :: %{ - optional(:keys) => :atoms | :atoms!, - optional(:decimal) => boolean, - optional(:as) => as - } + @typep option :: {:keys, :atoms | :atoms!} | {:decimal, boolean} | {:as, as} + @type options :: + %{ + optional(:keys) => :atoms | :atoms!, + optional(:decimal) => boolean, + optional(:as) => as + } + | [option] @spec decode(t, options) :: any def decode(value, options)