Help for this page

Select Code to Download


  1. or download this
    {    
        "a": "x",
    ...
            "f":false
        }
    }
    
  2. or download this
    $VAR1 = {
              'a' => 'x',
    ...
                     }
            };
    Can't encode a value of type: JSON::XS::Boolean at test2.pl line 13
    
  3. or download this
    use strict;
    use warnings;
    ...
    print Dumper($result);
    my $rec = XMLout( $result, RootName => 'root', SuppressEmpty => 1);
    print Dumper($rec);
    
  4. or download this
    $VAR1 = {
              'a' => 'x',
    ...
      <b c="true" d="false" e="true" f="false" />
    </root>
    ';
    
  5. or download this
        elsif (JSON::XS::is_bool($node)) {
            #$node += 0;  #  this results in 1 or 0
            #$node = "$node";  #  this results in "true" or "false"
            $node = ($node) ? \1 : \0;  #  this results in \1 or \0  (whic
    +h are mapped to Json true and false by encode_json...)
        }