Skip to content

Commit a018fc7

Browse files
authored
Merge pull request #202 from davemenninger/decode-spec
2 parents 1ad62e3 + a9e2388 commit a018fc7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

lib/poison/decoder.ex

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,14 @@ defprotocol Poison.Decoder do
108108

109109
@typep as :: map | struct | [as]
110110

111-
@type options :: %{
112-
optional(:keys) => :atoms | :atoms!,
113-
optional(:decimal) => boolean,
114-
optional(:as) => as
115-
}
111+
@typep option :: {:keys, :atoms | :atoms!} | {:decimal, boolean} | {:as, as}
112+
@type options ::
113+
%{
114+
optional(:keys) => :atoms | :atoms!,
115+
optional(:decimal) => boolean,
116+
optional(:as) => as
117+
}
118+
| [option]
116119

117120
@spec decode(t, options) :: any
118121
def decode(value, options)

0 commit comments

Comments
 (0)