Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
RATIONALE
A chunked parser that failed to consume the next token means either:
There's nothing polemic about the first case. As for the second one:
I. Either the stream is invalid and it'll abort parsing;
II. Or we're using a syntactic extension to the JSON stream and want to
trigger a fallback mini-parser to consume that part of the stream.
If a parser doesn't report invalid token the user will try to buffer the
stream forever. However if invalid token is a terminal state then the
user can't combine parsers to support an extended JSON syntax. A chunked
parser meant to be used combined with other parsers should report all 3
scenarios:
If we exclude the first event from the notification set the parser isn't
useful at all. If we exclude the second event then we don't have a
chunked parser. If we exclude the third event the user might buffer
forever on invalid tokens. Thus all three events must be part of the
notification set.
Updates #53