++ed by:
JONASS VOJ

2 PAUSE user(s)
3 non-PAUSE user(s).

Nicolas Steenlant
and 13 contributors

NAME

Catmandu::Exporter::JSON - a JSON exporter

SYNOPSIS

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;

DESCRIPTION

This Catmandu::Exporter exports items serialized in JSON format. By default each item is printed condensed on one line.

CONFIGURATION

file
fh
fix
encoding

Default options of Catmandu::Exporter.

pretty
multiline

Alias for pretty.

indent
space_before
space_after
canonical

JSON serialization options.

array

Seralize items as one JSON array instead of concatenated JSON objects.

METHODS

See Catmandu::Exporter

SEE ALSO

Catmandu::Exporter::YAML