xt, it will have the value 0 or 1.
In string context is will have the value "false" or "true".
In JSON, it will correctly return false or true values.
my $bool : Boolean;
print $bool; # "f
xt.
=head2 TO_JSON
Provided that convert_blessed is set on the JSON (or JSON::XS) object,
the variable will correctly convert to JSON true or false.
my $json = new JSON;
$json->pretty->conv
ssed;
my $bool : Boolean;
my %hash = (
value => $bool,
me => true,
);
print $json->encode(\%hash); # {
# "value" : false,
# "me" : true
# }