5 unless ( eval { require JSON; 1 } ) {
6 plan skip_all => 'No JSON';
11 my $data = JSON()->new->decode('{"foo": true, "bar": false, "baz": 1}');
14 JSON::is_bool($data->{foo}),
15 'JSON.pm: true decodes to a bool',
18 JSON::is_bool($data->{bar}),
19 'JSON.pm:: false decodes to a bool',
22 !JSON::is_bool($data->{baz}),
23 'JSON.pm: int does not decode to a bool',