unless iterate option is specified, jsx now buffers events internally before returning

This commit is contained in:
alisdair sullivan 2011-08-09 17:49:42 -07:00
parent 986b60af37
commit 8bb0f66470
5 changed files with 143 additions and 100 deletions

View file

@ -39,7 +39,7 @@
jsx_term() | {jsx, incomplete, fun()}.
json_to_term(JSON, Opts) ->
P = jsx:decoder(extract_parser_opts(Opts)),
P = jsx:decoder([iterate] ++ extract_parser_opts(Opts)),
case proplists:get_value(strict, Opts, false) of
true -> collect_strict(P(JSON), [[]], Opts)
; false -> collect(P(JSON), [[]], Opts)