NAME

Datahub::Factory::Importer::JSON - Import data from JSON flat file data dumps

SYNOPSIS

    use Datahub::Factory;
    use Data::Dumper qw(Dumper);

    my $json = Datahub::Factory->importer('JSON')->new(
        file_name => '/tmp/export.json',
    );

    $json->importer->each(sub {
        my $item = shift;
        print Dumper($item);
    });

DESCRIPTION

Datahub::Factory::Importer::JSON uses Catmandu to fetch a list of records from an JSON flat file data dump. It returns an Importer.

PARAMETERS

file_name

Location of the JSON flat file data dump.

ATTRIBUTES

importer

A Importer that can be used in your script.

AUTHOR

Matthias Vandermaesen <matthias dot vandermaesen at vlaamsekunstcollectie.be >

COPYRIGHT

Copyright 2017- Vlaamsekunscollectie vzw, PACKED vzw

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Datahub::Factory Catmandu