[librecat-dev] Export into JSON using perl
Nicolas Franck
Nicolas.Franck at UGent.be
Thu Mar 7 16:40:46 CET 2019
> On 7 Mar 2019, at 16:30, Tiago Murakami <trmurakami at gmail.com> wrote:
>
> Hi,
>
> I made my first perl script to convert MARC ALEPHSEQ into JSON. I can import and convert to JSON using myfixes. How I can export into JSON files?
>
> Thanks,
>
> =================
>
> use Catmandu;
>
> my $importer = Catmandu->importer('MARC',file => 'input/2records.seq' , type => 'ALEPHSEQ');
> my $fixer = Catmandu->fixer('fixesCatmandu.txt');
> my $exporter = Catmandu->exporter('JSON');
my $exporter = Catmandu->exporter('JSON', file => "/path/to/my/file.json");
or direct the output of stdout to a file
>
> $exporter->add_many(
> $fixer->fix($importer->benchmark)
> );
>
> =================
>
> --
> Tiago Murakami
> _______________________________________________
> librecat-dev mailing list
> - send list mails to librecat-dev at lists.uni-bielefeld.de
> - to unsubscribe or change options, visit https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev
> - project website: http://librecat.org/
More information about the librecat-dev
mailing list