Created
February 13, 2013 00:44
-
-
Save cxreg/4780241 to your computer and use it in GitHub Desktop.
JSON::XS is insane
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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