Catmandu::Exporter::JSON(3pm) | User Contributed Perl Documentation | Catmandu::Exporter::JSON(3pm) |
Catmandu::Exporter::JSON - a JSON exporter
# From the command line catmandu convert YAML to JSON --pretty 1 < input.yml # Export in the line-delimited format catmandu convert YAML to JSON --line_delimited 1 < input.yml # In a Perl script use Catmandu; my $exporter = Catmandu->exporter('JSON', fix => 'myfix.txt'); $exporter->add_many($arrayref); $exporter->add_many($iterator); $exporter->add_many(sub { }); $exporter->add($hashref); printf "exported %d items\n" , $exporter->count;
This Catmandu::Exporter exports items serialized in JSON format. By default each item is printed condensed on one line.
Catmandu::Exporter::YAML
2023-03-03 | perl v5.36.0 |