Merge https://github.com/okeuday/jsx into develop
This commit is contained in:
commit
91dcb65e3c
2 changed files with 9 additions and 5 deletions
|
@ -60,8 +60,11 @@ format(Source) -> format(Source, []).
|
||||||
format(Source, Opts) -> jsx_to_json:format(Source, Opts).
|
format(Source, Opts) -> jsx_to_json:format(Source, Opts).
|
||||||
|
|
||||||
|
|
||||||
-spec to_term(Source::binary()) -> any().
|
-spec to_term(Source::binary()) ->
|
||||||
-spec to_term(Source::binary(), Opts::jsx_to_term:opts()) -> any().
|
list({binary(), any()}).
|
||||||
|
-spec to_term(Source::binary(), Opts::jsx_to_term:opts()) ->
|
||||||
|
list({binary(), any()}).
|
||||||
|
|
||||||
|
|
||||||
to_term(Source) -> to_term(Source, []).
|
to_term(Source) -> to_term(Source, []).
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
-type opts() :: list().
|
-type opts() :: list().
|
||||||
|
|
||||||
|
|
||||||
-spec to_term(Source::(binary() | list()), Opts::opts()) -> binary().
|
-spec to_term(Source::(binary() | list()), Opts::opts()) ->
|
||||||
|
list({binary(), any()}).
|
||||||
|
|
||||||
to_term(Source, Opts) when is_list(Opts) ->
|
to_term(Source, Opts) when is_list(Opts) ->
|
||||||
(jsx:decoder(?MODULE, Opts, jsx_utils:extract_opts(Opts)))(Source).
|
(jsx:decoder(?MODULE, Opts, jsx_utils:extract_opts(Opts)))(Source).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue