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:
parent
6797bf3ed7
commit
e4a401a3a6
2 changed files with 30 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue