in reply to Re^2: Parsing JSON out of an incremental stream
in thread Parsing JSON out of an incremental stream
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" }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Parsing JSON out of an incremental stream
by Sec (Monk) on Feb 18, 2019 at 16:00 UTC | |
by marto (Cardinal) on Feb 18, 2019 at 16:26 UTC |