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([encoder/3]).
-spec encoder(Mod::module(), Args::any(), Opts::jsx:opts()) -> jsx:encoder().
-spec encoder(Handler::module(), State::any(), Opts::jsx:opts()) -> jsx:encoder().
encoder(Mod, Args, Opts) ->
fun(JSON) -> start(JSON, {Mod, Mod:init(Args)}, jsx_utils:parse_opts(Opts)) end.
encoder(Handler, State, Opts) ->
fun(JSON) -> start(JSON, {Handler, State}, jsx_utils:parse_opts(Opts)) end.