:JSON::Enhanced;
use 5.010;
use strict;
use warnings;
our $VERSION = '0.10';
use strict;
use warnings;
# which loads JSON::XS with a purel-perl JSON fallback
use JSON;
use Data::Roundtrip qw/json
() don't import it
our @ISA = qw(Exporter);
our @EXPORT = qw/
config2perl
/;
# Convert enhanced JSON string into a Perl data structure.
# The input parameters hashref:
# * specify where is the cont
ute
# <% xx %> with hello
# * optional 'remove-comments-in-strings' to remove comments from JSON strings
# (both keys and values), default is to KEEP anything inside a string
# even if it
)';
binmode STDIN, ':encoding(UTF-8)';
use Getopt::Long qw(:config no_ignore_case);
use Config::JSON::Enhanced;
use Data::Roundtrip qw/perl2dump no-unicode-escape-permanently/;
my $OUTPUT_FILE = un
I inputstring] [--i 'afile.json'] [--o afile] [--c commentstyle] [--tags tags] [--(no-)escape-unicode|-e] [--(no-)terse] [--(no-)indent]\n"
."\nIt will read an Enhanced-JSON string from command line
local $/; <STDIN> }
}
my $result = Config::JSON::Enhanced::config2perl(\%params);
if( ! defined $result ){ print STDERR "$0 : error, call to ".'Config::JSON::Enhanced::config2perl()'." has failed.\n"
ncoding(UTF-8)';
use Getopt::Long qw(:config no_ignore_case);
use Config::JSON::Enhanced;
use Data::Roundtrip qw/perl2json no-unicode-escape-permanently/;
my $OUTPUT_FILE = undef;
my %params = (
'
ub usage { return
"Usage : $0 [--I inputstring] [--i 'afile.json'] [--o afile] [--c commentstyle] [--tags tags]\n"
."\nIt will read a JSON string from command line (-I), or from a file (-i)\n"
."\n
local $/; <STDIN> }
}
my $result = Config::JSON::Enhanced::config2perl(\%params);
if( ! defined $result ){ print STDERR "$0 : error, call to ".'Config::JSON::Enhanced::config2perl()'." has failed.\n"
)';
binmode STDIN, ':encoding(UTF-8)';
use Getopt::Long qw(:config no_ignore_case);
use Config::JSON::Enhanced;
use Data::Roundtrip qw/perl2yaml no-unicode-escape-permanently/;
my $OUTPUT_FILE = un
ub usage { return
"Usage : $0 [--I inputstring] [--i 'afile.json'] [--o afile] [--c commentstyle] [--tags tags]\n"
."\nIt will read a JSON string from command line (-I), or from a file (-i)\n"
."\n
local $/; <STDIN> }
}
my $result = Config::JSON::Enhanced::config2perl(\%params);
if( ! defined $result ){ print STDERR "$0 : error, call to ".'Config::JSON::Enhanced::config2perl()'." has failed.\n"