incr_parse#

Parse JSON texts as they arrive, a piece at a time.

Synopsis#

my $json = JSON::XS->new;
$json->incr_parse('[1,');           # append, nothing complete yet
my @texts = $json->incr_parse('2][3]');   # ([1, 2], [3])

What you get back#

In void context nothing: the text is only appended. In scalar context the first complete JSON text decoded, or nothing while none is complete; in list context every complete one.