Group
Extension

Matches 7

Data-Roundtrip ( B/BL/BLIAKO/Data-Roundtrip-0.30.tar.gz, BLIAKO, 2025; MetaCPAN )
Data-Roundtrip/script/json2perl.pl ( view source; MetaCPAN )
eturn
	"Usage : $0 [--I 'a-json-string' | --i 'afile.json'] [--o afile] [--(no-)escape-unicode|-e] [--(no-)pretty] [--(no-)terse] [--(no-)indent]\n"
	."\nIt will read a JSON string from command line (
TDIN> }
}

my $result = Data::Roundtrip::json2dump($INPUT_STRING, \%params);
if( ! defined $result ){ print STDERR "$0 : error, call to ".'Data::Roundtrip::json2dump()'." has failed.\n"; exit(1) }

if
NAME

json2perl.pl : convert JSON data to a Perl variable (dump) which can be parsed or eval'ed by any Perl script.

=head1 VERSION

Version 0.30

=head1 SYNOPSIS

    json2perl.pl -i "input.json" -o 
Data-Roundtrip ( B/BL/BLIAKO/Data-Roundtrip-0.30.tar.gz, BLIAKO, 2025; MetaCPAN )
Data-Roundtrip/lib/Data/Roundtrip.pm ( view source; MetaCPAN )
g unicode escaped and rendered at will.

use Encode qw/encode_utf8 decode_utf8/;
use JSON qw/decode_json encode_json/;
use Unicode::Escape qw/escape unescape/;
# YAML v1.30 fails for {"\"aaa'bbb" => "
lehandle};
	my @io = (@file, @fh);
	my @json = qw{perl2json json2perl json2dump json2yaml json2json jsonfile2perl};
	my @yaml = qw{perl2yaml yaml2perl yaml2json yaml2dump yaml2yaml yamlfile2perl};
	my
p_filtered perl2dump_homebrew};
	# these have now (v0.28) been removed from @dump: dump2perl dump2json dump2yaml dump2dump
	# they need to be explicitly imported *individually*
	# because of the dange
Data-Roundtrip ( B/BL/BLIAKO/Data-Roundtrip-0.30.tar.gz, BLIAKO, 2025; MetaCPAN )
Data-Roundtrip/script/json2json.pl ( view source; MetaCPAN )

sub usage { return
	"Usage : $0 [--I 'a-json-string' | --i 'afile.json'] [--o afile] [--(no-)escape-unicode|-e] [--(no-)pretty|-p]\n"
	."\nIt will read a JSON string from command line (-I), or from a
ware 4K limit on linux terminal, see CAVEATS for workaround).\n"
	."It will print its contents as JSON to STDOUT or to a file (--o).\n"
	."It can escape/un-escape unicode characters (--escape-unicode)
N> }
}

my $result = Data::Roundtrip::json2json($INPUT_STRING, \%params);
if( ! defined $result ){ print STDERR "$0 : error, call to ".'Data::Roundtrip::json2jsonl()'." has failed.\n"; exit(1) }

if( 
Data-Roundtrip ( B/BL/BLIAKO/Data-Roundtrip-0.30.tar.gz, BLIAKO, 2025; MetaCPAN )
Data-Roundtrip/script/yaml2json.pl ( view source; MetaCPAN )
 }
}

my $result = Data::Roundtrip::yaml2json($INPUT_STRING, \%params);
if( ! defined $result ){ print STDERR "$0 : error, call to ".'Data::Roundtrip::yaml2jsonl()'." has failed.\n"; exit(1) }

if( de
aml2json.pl : convert YAML to JSON with formatting options

=head1 VERSION

Version 0.30

=head1 SYNOPSIS

    yaml2json.pl -i "input.yaml" -o "output.json" --escape-unicode --pretty

    yaml2json.pl
 -e < "input.yaml" > "output.json"

    # press CTRL-D when done typing YAML to STDIN
    # input must be less than 4K long!
    yaml2json.pl

    # Read input from clipboard or write output to clipbo
Data-Roundtrip ( B/BL/BLIAKO/Data-Roundtrip-0.30.tar.gz, BLIAKO, 2025; MetaCPAN )
Data-Roundtrip/script/perl2json.pl ( view source; MetaCPAN )
=> 0,
);
sub usage { return
	"Usage : $0 [--I 'a-perl-var-as-string' | --i 'afile.pl'] [--o afile.json] [--(no-)escape-unicode|-e] [--(no-)pretty]\n"
	."\nIt will read a Perl variable as a string from
om STDIN (beware 4K limit on linux terminal, see CAVEATS for workaround).\n"
	."It will print its JSON equivalent to STDOUT or to a file (--o).\n"
	."It can optionally escape unicode characters (--esc
 }
}

my $result = Data::Roundtrip::dump2json($INPUT_STRING, \%params);
if( ! defined $result ){ print STDERR "$0 : error, call to ".'Data::Roundtrip::dump2jsonl()'." has failed.\n"; exit(1) }

if( de
Data-Roundtrip ( B/BL/BLIAKO/Data-Roundtrip-0.30.tar.gz, BLIAKO, 2025; MetaCPAN )
Data-Roundtrip/script/yaml2perl.pl ( view source; MetaCPAN )
r pbpaste (on OSX))
    json2json.pl -e < $(xclip -o)
    json2json.pl -e < $(pbaste)
    # write the output to the clipboard for further pasting
    json2json.pl -i input.json | xclip -i
    # clicki
Data-Roundtrip ( B/BL/BLIAKO/Data-Roundtrip-0.30.tar.gz, BLIAKO, 2025; MetaCPAN )
Data-Roundtrip/script/json2yaml.pl ( view source; MetaCPAN )
ported
);

sub usage { return
	"Usage : $0 [--I 'a-json-string' | --i 'afile.json'] [--o afile] [--(no-)escape-unicode|-e]\n"
	."\nIt will read a JSON string from command line (-I), or from a file (-i
TDIN> }
}

my $result = Data::Roundtrip::json2yaml($INPUT_STRING, \%params);
if( ! defined $result ){ print STDERR "$0 : error, call to ".'Data::Roundtrip::json2yaml()'." has failed.\n"; exit(1) }

if
AME

json2yaml.pl : convert JSON to YAML with formatting options.

=head1 VERSION

Version 0.30

=head1 SYNOPSIS

    json2yaml.pl -i "input.json" -o "output.yaml" --(no-)escape-unicode

    json2yaml

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