use 5.012; # strict, //
use warnings;
use JSON 4.0;
use Data::Dumper;
print "JSON::VERSION = $JSON::VERSION\n";
my $json = JSON->new;
$json->boolean_values(0,1);
test@BruceDEV:~$ perl Perl-Testing/JSON-boolean_values.pl
JSON::VERSION = 4.02
Can't locate object method "boolean_values" via package "JSON" at Perl-Testing/JSON-boolean_values.pl line 11.
####
Debian GNU/Linux 10
ii libjson-perl 4.02000-1 all module for manipulating JSON-formatted data
ii libjson-xs-perl 3.040-1+b1 amd64 module for manipulating JSON-formatted data (C/XS-accelerated)
####
package JSON;
use strict;
use Carp ();
use Exporter;
BEGIN { @JSON::ISA = 'Exporter' }
@JSON::EXPORT = qw(from_json to_json jsonToObj objToJson encode_json decode_json);
BEGIN {
$JSON::VERSION = '4.02';
$JSON::DEBUG = 0 unless (defined $JSON::DEBUG);
$JSON::DEBUG = $ENV{ PERL_JSON_DEBUG } if exists $ENV{ PERL_JSON_DEBUG };
}
[...]
=head2 boolean_values (since version 4.0)
$json->boolean_values([$false, $true])
($false, $true) = $json->get_boolean_values
By default, JSON booleans will be decoded as overloaded
C<$JSON::false> and C<$JSON::true> objects.