Subject: | JSON::Syck::Load() doesn't decode javascript escape sequences. |
It seems that JSON::Syck::Load() doesn't decode javascript escape
sequences. See my test script below that fails on my system:
use strict;
use JSON::Syck ();
use Test::More qw(no_plan);
my $json = 'line1\tline2';
my $data = JSON::Syck::Load($json);
cmp_ok($data, 'eq', "line1\tline2", 'Are simple JS escape sequences
decoded (correctly)?');
#### The failure output ####
not ok 1 - Are JS escape sequences parsed correctly?
# Failed test 'Are JS escape sequences parsed correctly?'
# at ./t.pl line 9.
# got: 'line1\tline2'
# expected: 'line1 line2'
1..1
# Looks like you failed 1 test of 1.
Perhaps this is all intentional as is the lack of optionally converting
perl utf8 characters into JSON \uXXXX escape sequences and 8-bit
control characters into JSON \xXX escape sequences, and vice versa.