Skip to content

Commit

Permalink
Merge pull request #202 from davemenninger/decode-spec
Browse files Browse the repository at this point in the history
  • Loading branch information
devinus authored May 31, 2024
2 parents 1ad62e3 + a9e2388 commit a018fc7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/poison/decoder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a018fc7

Please sign in to comment.