Catmandu::Exporter::JSON - a JSON exporter
Command line interface:
catmandu convert YAML to JSON --pretty 1 < input.yml
In Perl code:
use Catmandu -all; my $exporter = exporter('JSON', fix => 'myfix.txt'); $exporter->add_many($arrayref); $exporter->add_many($iterator); $exporter->add_many(sub { }); $exporter->add($hashref); printf "exported %d objects\n" , $exporter->count;
This Catmandu::Exporter exports items serialized in JSON format. By default each item is printed condensed on one line.
Default options of Catmandu::Exporter.
Alias for pretty.
pretty
JSON serialization options.
Seralize items as one JSON array instead of concatenated JSON objects.
See Catmandu::Exporter
Catmandu::Exporter::YAML
To install Catmandu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu
CPAN shell
perl -MCPAN -e shell install Catmandu
For more information on module installation, please visit the detailed CPAN module installation guide.