[librecat-dev] Export into JSON using perl

Nicolas Steenlant Nicolas.Steenlant at UGent.be
Thu Mar 7 16:38:24 CET 2019


Hi,

do you mean?

Catmandu->exporter('JSON', file => 'out.json');

On Thu, 2019-03-07 at 12:30 -0300, Tiago Murakami 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');
> 
> $exporter->add_many(
>      $fixer->fix($importer->benchmark)
> );
> 
> =================
> 
> _______________________________________________
> 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