Scroll to navigation

Catmandu::Exporter::JSON(3pm) User Contributed Perl Documentation Catmandu::Exporter::JSON(3pm)
 

NAME

Catmandu::Exporter::JSON - a JSON exporter

SYNOPSIS

    use Catmandu::Exporter::JSON;
    my $exporter = Catmandu::Exporter::JSON->new(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;

METHODS

new(file => PATH, fh => HANDLE, fix => STRING|ARRAY, pretty => 0|1, array => 0|1)

Create a new JSON exporter optionally providing a file path, a file handle, a fix file or array and a pretty printing option.

SEE ALSO

Catmandu::Exporter
2014-10-14 perl v5.20.1