Subject: | Interoperability fail with JSON::XS |
Date: | Tue, 28 Jan 2014 18:50:05 -0500 |
To: | bug-JSON-MaybeXS [...] rt.cpan.org |
From: | Samuel Kaufman <samuel.c.kaufman [...] gmail.com> |
use JSON::MaybeXS ();
my $boolstring = '{ "is_true" : true }';
my $xs_string;
{
use JSON::XS ();
my $json = JSON::XS->new;
$xs_string = $json->decode( $boolstring );
}
my $json = JSON::MaybeXS->new;
$json->encode( $xs_string );
# ^ dies: encountered object '1', but neither allow_blessed nor
convert_blessed settings are enabled
This becomes a problem when trying to use JSON::MaybeXS for a drop in
replacement without replacing JSON::XS everywhere.