Subject: | using JSON::XS to encode sparse arrays causes perl segfault |
Giving JSON::XS an entity to encode that is (or contains) a sparse
array, and it will segfault/bus error.
Example code:
use JSON::XS;
use Data::Dumper;
my @list;
$list[0] = "foo";
$list[3] = "fibble";
print Dumper(\@list);
my $jsonobject = JSON::XS->new->utf8->pretty(1);
print $jsonobject->encode(\@list); # this causes segfault of perl