Group
Extension

Matches 1

Devel-JSON ( D/DO/DOLMEN/Devel-JSON-1.001.tar.gz, DOLMEN, 2017; MetaCPAN )
Devel-JSON/lib/Devel/JSON.pm ( view source; MetaCPAN )
e strict;
use warnings;

package Devel::JSON;

our $VERSION = '1.001';

# Just to allow to be loaded with -d:JSON
sub DB::DB {}

use JSON::MaybeXS ();

our @JSON_options;

# 2.05: _get_locale_encoding
_enc =~ /UTF/i) { # Native JSON encoding
    binmode(STDOUT, ":encoding($locale_enc)")
} else {
    @JSON_options = (ascii => 1)
}


sub import
{
    shift;
    unshift @JSON_options, map { s/^-// ? (
int JSON::MaybeXS->new(pretty => 1, canonical => 1, allow_nonref => 1, @Devel::JSON::JSON_options)->encode(scalar do {use utf8;'. $_ . '})'
};

1;
__END__

=encoding UTF-8

=head1 NAME

Devel::JSON - 

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