[Opensrf-commits] r1665 - branches/rel_1_0/src/perl/lib/OpenSRF/Utils (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Feb 17 12:48:57 EST 2009
Author: erickson
Date: 2009-02-17 12:48:54 -0500 (Tue, 17 Feb 2009)
New Revision: 1665
Modified:
branches/rel_1_0/src/perl/lib/OpenSRF/Utils/JSON.pm
Log:
backporting r1664
Modified: branches/rel_1_0/src/perl/lib/OpenSRF/Utils/JSON.pm
===================================================================
--- branches/rel_1_0/src/perl/lib/OpenSRF/Utils/JSON.pm 2009-02-17 17:47:18 UTC (rev 1664)
+++ branches/rel_1_0/src/perl/lib/OpenSRF/Utils/JSON.pm 2009-02-17 17:48:54 UTC (rev 1665)
@@ -79,7 +79,10 @@
}
return undef;
}
- $obj->{$_} = $class->JSONObject2Perl($obj->{$_}) for (keys %$obj);
+ for my $k (keys %$obj) {
+ $obj->{$k} = (ref($obj->{$k}) eq 'JSON::XS::Boolean') ?
+ $obj->{$k} : $class->JSONObject2Perl($obj->{$k});
+ }
} elsif( $ref eq 'ARRAY' ) {
$obj->[$_] = $class->JSONObject2Perl($obj->[$_]) for(0..scalar(@$obj) - 1);
}
More information about the opensrf-commits
mailing list