incomplete input now results in an error when parsing json or jsx

internal form

streaming decoding is now only available when forced with the
`stream` option and no longer returns until forced to via the
token `end_stream`. this api is still subject to being replaced
with an even more explicit streaming mode
This commit is contained in:
alisdair sullivan 2013-07-13 02:05:16 +00:00
parent 6797bf3ed7
commit e4a401a3a6
2 changed files with 30 additions and 2 deletions

View file

@ -72,6 +72,8 @@ resume(Rest, State, Handler, Stack, Config) ->
-endif.
incomplete(State, Handler, Stack, Config=#config{stream=false}) ->
?error(State, [], Handler, Stack, Config);
incomplete(State, Handler, Stack, Config=#config{incomplete_handler=false}) ->
{incomplete, fun(end_stream) ->
case resume([end_json], State, Handler, Stack, Config) of