Group
Extension

Matches 1

Perinci-Sub-GetArgs-Argv ( P/PE/PERLANCAR/Perinci-Sub-GetArgs-Argv-0.850.tar.gz, PERLANCAR, 2023; MetaCPAN )
Perinci-Sub-GetArgs-Argv/lib/Perinci/Sub/GetArgs/Argv.pm ( view source; MetaCPAN )
$errmsg, $res)
sub _parse_json {
    my $str = shift;

    state $json = do {
        require JSON::PP;
        JSON::PP->new->allow_nonref;
    };

    # to rid of those JSON::PP::Boolean objects whi
rk of JSON::PP which doesn't
    # produce those in the first place (probably only when performance is
    # critical).
    state $cleanser = do {
        if (eval { require Data::Clean::FromJSON; 1 }
) {
            Data::Clean::FromJSON->get_cleanser;
        } else {
            undef;
        }
    };

    my $res;
    eval { $res = $json->decode($str); $cleanser->clean_in_place($res) if $clean

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.