better specs for to_term/x, thanks to michael truog
This commit is contained in:
parent
10c3b1b611
commit
cff2ffa295
2 changed files with 24 additions and 6 deletions
|
@ -34,8 +34,14 @@
|
|||
-type opts() :: list().
|
||||
|
||||
|
||||
-spec to_term(Source::(binary() | list()), Opts::opts()) ->
|
||||
list({binary(), any()}).
|
||||
-spec to_term(Source::binary(), Opts::opts()) -> list({binary(), any()})
|
||||
| list(any())
|
||||
| true
|
||||
| false
|
||||
| null
|
||||
| integer()
|
||||
| float()
|
||||
| binary().
|
||||
|
||||
to_term(Source, Opts) when is_list(Opts) ->
|
||||
(jsx:decoder(?MODULE, Opts, jsx_utils:extract_opts(Opts)))(Source).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue