I can reproduce this, but only with with JSON::PP. With JSON::XS, it works like a charm:
PERL_JSON_BACKEND=JSON::PP perl -MData::Dump=dump -MJSON -E 'my $json = JSON->new;@foo=$json->incr_parse(q!{"check_result!); $bar=$json->incr_parse(q!" : "ok"}!); dump $bar'Output: unexpected end of string while parsing JSON string, at character offset 14 (before "(end of string)") at -e line 1.
PERL_JSON_BACKEND=JSON::XS perl -MData::Dump=dump -MJSON -E 'my $json = JSON->new;@foo=$json->incr_parse(q!{"check_result!); $bar=$json->incr_parse(q!" : "ok"}!); dump $barOutput: { check_result => "ok" }
In reply to Re^3: Parsing JSON out of an incremental stream
by haj
in thread Parsing JSON out of an incremental stream
by Sec
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |