Help for this page

Select Code to Download


  1. or download this
    $_[0] = undef if 
            (ref $r eq "HASH" && ! %$r) or
            (ref $r eq "ARRAY" && ! @$r);
    
  2. or download this
    my $reference_from_json = JSON->new->allow_nonref->relaxed->decode(do 
    +{ local $/; <STDIN>; }); 
    tidyup_json($refrence_from_json); 
    
    print JSON->new->pretty->allow_nonref->canonical->encode($reference_fr
    +om_json);
    
  3. or download this
            elsif( blessed($value) and  $value->isa('JSON::PP::Boolean') )
    +{
                return $$value == 1 ? 'true' : 'false';
            }