options are now proplist style, so [comments] implies [{comments, true}] et cetera
This commit is contained in:
parent
88da19783a
commit
a6e7490a2b
5 changed files with 51 additions and 13 deletions
11
src/jsx.erl
11
src/jsx.erl
|
@ -258,11 +258,14 @@ json_to_term(JSON) ->
|
|||
|
||||
-spec json_to_term(JSON::binary(), Opts::decoder_opts()) -> eep0018().
|
||||
|
||||
%json_to_term(JSON, Opts) ->
|
||||
% try jsx_eep0018:json_to_term(JSON, Opts)
|
||||
% %% rethrow exception so internals aren't confusingly exposed to users
|
||||
% catch error:badarg -> erlang:error(badarg)
|
||||
% end.
|
||||
|
||||
json_to_term(JSON, Opts) ->
|
||||
try jsx_eep0018:json_to_term(JSON, Opts)
|
||||
%% rethrow exception so internals aren't confusingly exposed to users
|
||||
catch error:badarg -> erlang:error(badarg)
|
||||
end.
|
||||
jsx_eep0018:json_to_term(JSON, Opts).
|
||||
|
||||
|
||||
%% @spec term_to_json(JSON::eep0018()) -> binary()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue