03
     ˆ¿¾ƒh¹ÂÁ      0
     	�ÀÂÁ      	File not found.
     �Àa–Ým_J*j"Tâ€Æß¸ÓŠbÑ¿Â      File not found.
  0   ˆl–Ým_Jõ5*€À?pN)‹FÿÀ„pM…ï_‹uÐb&=LV[(ÀÄ ?÷     package JSON;


use strict;
use Carp ();
use Exporter;
BEGIN { @JSON::ISA = 'Exporter' }

@JSON::EXPORT = qw(from_json to_json jsonToObj objToJson encode_json decode_json);

BEGIN {
    $JSON::VERSION = '4.10';
    $JSON::DEBUG   = 0 unless (defined $JSON::DEBUG);
    $JSON::DEBUG   = $ENV{ PERL_JSON_DEBUG } if exists $ENV{ PERL_JSON_DEBUG };
}

my %RequiredVersion = (
    'JSON::PP' => '2.27203',
    'JSON::XS' => '2.34',
);

# XS and PP common methods

my @PublicMethods = qw/
    ascii latin1 utf8 pretty indent space_before space_after relaxed canonical allow_nonref 
    allow_blessed convert_blessed filter_json_object filter_json_single_key_object 
    shrink max_depth max_size encode decode decode_prefix allow_unknown
/;

my @Properties = qw/
    ascii latin1 utf8 indent space_before space_after relaxed canonical allow_nonref
    allow_blessed convert_blessed shrink max_depth max_size allow_unknown
/;

my @XSOnlyMethods = qw//; # Currently nothing

my @PublicMethodsSince4_0 = qw/allow_tags/;
my @PropertiesSince4_0 = qw/allow_tags/;

my @PPOnlyMethods = qw/
    indent_length sort_by
    allow_singlequote allow_bignum loose allow_barekey escape_slash as_nonblessed
/; # JSON::PP specific


# used in _load_xs and _load_pp ($INSTALL_ONLY is not used currently)
my $_INSTALL_DONT_DIE  = 1; # When _load_xs fails to load XS, don't die.
my $_ALLOW_UNSUPPORTED = 0;
my $_UNIV_CONV_BLESSED = 0;


# Check the environment variable to decide worker module. 

unless ($JSON::Backend) {
    $JSON::DEBUG and  Carp::carp("Check used worker module...");

    my $backend = exists $ENV{PERL_JSON_BACKEND} ? $ENV{PERL_JSON_BACKEND} : 1;

    if ($backend eq '1') {
        $backend = 'JSON::XS,JSON::PP';
    }
    elsif ($backend eq '0') {
        $backend = 'JSON::PP';
    }
    elsif ($backend eq '2') {
        $backend = 'JSON::XS';
    }
    $backend =~ s/\s+//g;

    my @backend_modules = split /,/, $backend;
    while(my $module = shift @backend_modules) {
        if ($module =~ /JSON::XS/) {
            _load_xs($module, @backend_modules ? $_INSTALL_DONT_DIE : 0);
        }
        elsif ($module =~ /JSON::PP/) {
            _load_pp($module);
        }
        elsif ($module =~ /JSON::backportPP/) {
            _load_pp($module);
        }
        else {
            Carp::croak "The value of environmental variable 'PERL_JSON_BACKEND' is invalid.";
        }
        last if $JSON::Backend;
    }
}


sub import {
    my $pkg = shift;
    my @what_to_export;
    my $no_export;

    for my $tag (@_) {
        if ($tag eq '-support_by_pp') {
            if (!$_ALLOW_UNSUPPORTED++) {
                JSON::Backend::XS
                    ->support_by_pp(@PPOnlyMethods) if ($JSON::Backend->is_xs);
            }
            next;
        }
        elsif ($tag eq '-no_export') {
            $no_export++, next;
        }
        elsif ( $tag eq '-convert_blessed_universally' ) {
            my $org_encode = $JSON::Backend->can('encode');
            eval q|
                require B;
                local $^W;
                no strict 'refs';
                *{"${JSON::Backend}\::encode"} = sub {
                    # only works with Perl 5.18+
                    local *UNIVERSAL::TO_JSON = sub {
                        my $b_obj = B::svref_2object( $_[0] );
                        return    $b_obj->isa('B::HV') ? { %{ $_[0] } }
                                : $b_obj->isa('B::AV') ? [ @{ $_[0] } ]
                                : undef
                                ;
                    };
                    $org_encode->(@_);
                };
            | if ( !$_UNIV_CONV_BLESSED++ );
            next;
        }
        push @what_to_export, $tag;
    }

    return if ($no_export);

    __PACKAGE__->export_to_level(1, $pkg, @what_to_export);
}


# OBSOLETED

sub jsonToObj {
    my $alternative = 'from_json';
    if (defined $_[0] and UNIV