JSON and JSON::PP do not honor each other's constants for true and false. Ideally we'd use only one or the other implementation and that would be that, but in legacy code that is not always an option:
$ perl -le 'use strict; use JSON; use JSON::PP; my $json = { true => JSON::PP::true, false => JSON::PP::false }; print JSON->new()->allow_blessed(1)->convert_blessed(1)->encode( $json ); '
Prototype mismatch: sub main::decode_json ($) vs none at /home/ski/perl5/lib/5.14.2/Exporter.pm line 67.
at -e line 1
Prototype mismatch: sub main::from_json ($@) vs ($) at /home/ski/perl5/lib/5.14.2/Exporter.pm line 67.
at -e line 1
Prototype mismatch: sub main::to_json ($@) vs ($) at /home/ski/perl5/lib/5.14.2/Exporter.pm line 67.
at -e line 1
{"false":null,"true":null}
$ perl -le 'use strict; use warnings; use JSON; use JSON::PP; my $json = { true => JSON::true, false => JSON::false }; print JSON::PP->new()->allow_blessed(1)->convert_blessed(1)->encode( $json ); '
Prototype mismatch: sub main::decode_json ($) vs none at /home/ski/perl5/lib/5.14.2/Exporter.pm line 67.
at -e line 1
Prototype mismatch: sub main::from_json ($@) vs ($) at /home/ski/perl5/lib/5.14.2/Exporter.pm line 67.
at -e line 1
Prototype mismatch: sub main::to_json ($@) vs ($) at /home/ski/perl5/lib/5.14.2/Exporter.pm line 67.
at -e line 1
{"false":null,"true":null}