Cpanel-JSON-XS

 view release on metacpan or  search on metacpan

t/12_blessed.t  view on Meta::CPAN

}

$js = Cpanel::JSON::XS->new;
$js->allow_blessed;
ok ($js->encode ($o1) eq "null", 'allow_blessed');
ok ($js->encode ($o2) eq "null");
ok ($js->encode ($o3) eq "null");
$js->allow_blessed->convert_blessed;
ok ($js->encode ($o1) eq '{"__":""}', 'allow_blessed + convert_blessed');
SKIP: {
  skip "5.6", 2 if $[ < 5.008;
  # PP returns null
  $r = $js->encode ($o2);
  ok ($r eq 'null', "$r");
  $r = $js->encode ($o3);
 TODO: {
   local $TODO = '5.8.x' if $] < 5.010;
   ok ($r eq '"<ZZ:1>"', "stringify $r");
  }
}



( run in 0.770 second using v1.01-cache-2.11-cpan-b61123c0432 )