Subject: | json tests fix |
Date: | Wed, 13 Jan 2010 17:50:38 +0000 |
To: | <bug-RPC-Lite [...] rt.cpan.org> |
From: | Stanisław Pitucha <stanislaw.pitucha [...] gradwell.com> |
Hi,
There are some tests failing because of new to_json, from_json and
(probably) changed names for convblessed parameter.
Tested on debian / perl-5.10.0
This patch makes RPC-Lite work on linux and pass the 12_unthreaded:
diff -ru RPC-Lite-0.10/lib/RPC/Lite/Serializer/JSON.pm
RPC-Lite-0.10-orig/lib/RPC/Lite/Serializer/JSON.pm
--- RPC-Lite-0.10/lib/RPC/Lite/Serializer/JSON.pm 2010-01-13
17:42:11.808469699 +0000
+++ RPC-Lite-0.10-orig/lib/RPC/Lite/Serializer/JSON.pm 2006-08-13
22:29:50.000000000 +0100
@@ -95,7 +95,7 @@
# JSON should unbless this for us...
}
- my $data = to_json( $object, { convert_blessed => 1 } );
+ my $data = objToJson( $object, { convblessed => 1 } );
$self->_Debug('Serializing', Dumper($object), $data) if($DEBUG);
@@ -109,7 +109,7 @@
length($data) or return undef;
- my $object = from_json( $data, { convert_blessed => 1 } );
+ my $object = jsonToObj( $data, { convblessed => 1 } );
$self->HandleJSONsNotStringCrap(\$object);
my $result = $object;