fix specs for to_term/x, thanks to michael truog
This commit is contained in:
parent
91dcb65e3c
commit
b57750fcfc
2 changed files with 11 additions and 7 deletions
|
@ -33,9 +33,16 @@
|
|||
|
||||
-type opts() :: list().
|
||||
|
||||
-type json_value() :: list({binary(), json_value()})
|
||||
| list(json_value())
|
||||
| true
|
||||
| false
|
||||
| null
|
||||
| integer()
|
||||
| float()
|
||||
| binary().
|
||||
|
||||
-spec to_term(Source::(binary() | list()), Opts::opts()) ->
|
||||
list({binary(), any()}).
|
||||
-spec to_term(Source::binary(), Opts::opts()) -> json_value().
|
||||
|
||||
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