fully integrate gen_json.erl

This commit is contained in:
alisdair sullivan 2012-01-31 20:56:08 -08:00
parent 9aaa23735a
commit e15a0e9a81
4 changed files with 35 additions and 35 deletions

View file

@ -26,10 +26,10 @@
-export([decoder/3]).
-spec decoder(Mod::module(), Args::any(), Opts::jsx:opts()) -> jsx:decoder().
-spec decoder(Handler::module(), State::any(), Opts::jsx:opts()) -> jsx:decoder().
decoder(Mod, Args, Opts) ->
fun(JSON) -> value(JSON, {Mod, Mod:init(Args)}, [], jsx_utils:parse_opts(Opts)) end.
decoder(Handler, State, Opts) ->
fun(JSON) -> value(JSON, {Handler, State}, [], jsx_utils:parse_opts(Opts)) end.