new is_term function that mirrors is_json for erlang terms

This commit is contained in:
alisdair sullivan 2012-03-04 18:40:00 -08:00
parent 620e6c7d91
commit ec295a888b
6 changed files with 64 additions and 27 deletions

View file

@ -37,7 +37,7 @@
-spec to_term(Source::(binary() | list()), Opts::opts()) -> binary().
to_term(Source, Opts) when is_list(Opts) ->
(jsx:decoder(?MODULE, init(Opts), Opts))(Source).
(jsx:decoder(?MODULE, init(Opts), jsx_utils:extract_opts(Opts)))(Source).