Skip to content

Instantly share code, notes, and snippets.

@cxreg
Created February 13, 2013 00:44
Show Gist options
  • Save cxreg/4780241 to your computer and use it in GitHub Desktop.
Save cxreg/4780241 to your computer and use it in GitHub Desktop.
JSON::XS is insane
perl -wle '
use JSON::XS;
use Data::Dumper;
my $json = JSON::XS->new();
$json->utf8(1);
print Dumper(wtf(q(["abc"])));
print Dumper(wtf(undef));
sub wtf {
my ($s) = @_;
$json->decode($s);
}
'
$VAR1 = [
'abc'
];
$VAR1 = [
'abc'
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment