Subject: | Underrun causes strange errors |
Hi,
If you feed the following chunks into the event-based interface, it triggers an error event:
"["
"null,428"
"]"
What seems to happen is that a buffer underrun is encountered after the second chunk, so the
stream rolls back to the comma in the second chunk. On the next attempt, the comma is the
first thing that is seen, so an "Unexpected comma" error is encountered. Attached is a test file
that demonstrates this.
Thanks,
Rob
Subject: | 06-underrun.t |
use strict;
use warnings;
use Test::More tests => 3;
use JSON::Streaming::Reader::TestUtil;
compare_event_parse("[", "null,428", "]");
compare_event_parse("[", "null,428", "123]");
compare_event_parse("[", "null,\"foo", "bar\"]");