encoder updated to use same api as decoder, format and verify updated to be aware of new api

This commit is contained in:
alisdair sullivan 2011-08-10 00:33:14 -07:00
parent 3485ca5413
commit 0c3cf2b87b
4 changed files with 144 additions and 136 deletions

View file

@ -41,7 +41,7 @@ is_json(JSON, OptsList) when is_binary(JSON) ->
P = jsx:decoder([iterate] ++ extract_parser_opts(OptsList)),
is_json(fun() -> P(JSON) end, OptsList);
is_json(Terms, OptsList) when is_list(Terms) ->
P = jsx:encoder(),
P = jsx:encoder([iterate]),
is_json(fun() -> P(Terms) end, OptsList);
is_json(F, OptsList) when is_function(F) ->
Opts = parse_opts(OptsList, #verify_opts{}),