diff --git a/src/jsx_to_json.erl b/src/jsx_to_json.erl index 3924bb6..30c6ffd 100644 --- a/src/jsx_to_json.erl +++ b/src/jsx_to_json.erl @@ -38,8 +38,7 @@ -spec to_json(Source::(binary() | list()), Opts::opts()) -> binary(). -to_json(Source, Opts) when (is_binary(Source) andalso is_list(Opts)) - orelse (is_list(Source) andalso is_list(Opts)) -> +to_json(Source, Opts) when is_list(Opts) -> (gen_json:parser(?MODULE, Opts, jsx_utils:extract_opts(Opts)))(Source). diff --git a/src/jsx_to_term.erl b/src/jsx_to_term.erl index c43df50..35b93ad 100644 --- a/src/jsx_to_term.erl +++ b/src/jsx_to_term.erl @@ -36,8 +36,7 @@ -spec to_term(Source::(binary() | list()), Opts::opts()) -> binary(). -to_term(Source, Opts) when (is_binary(Source) andalso is_list(Opts)) - orelse (is_list(Source) andalso is_list(Opts)) -> +to_term(Source, Opts) when is_list(Opts) -> (gen_json:parser(?MODULE, Opts, jsx_utils:extract_opts(Opts)))(Source).