Clay Fouts > MARC-File-JSON > MARC::File::JSON

Download:
MARC-File-JSON-0.003.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.003   Source  

NAME ^

MARC::File::JSON - Convert between MARC::Record objects and JSON formatted data.

SYNOPSIS ^

 use MARC::File::JSON;

 my $record = MARC::Record->new_from_json( $json );
 $json = $record->as_json;

DESCRIPTION ^

This module provides routines for converting between MARC::Record objects and serialized JSON data formatted as:

 {
   "leader":"01109cam a2200349 a 4500",
   "fields":[
     "001",
     "   89009461 //r92",
     "005",
     "19991006093052.0",
     "010", {
       "subfields":[
         "a",
         "89009461 //r92"
       ],
       "ind1":" ",
       "ind2":" "
     },
     "020",
     ...
   ]
 }

INTERFACE ^

MARC::Record::Generic injects two subroutines into the MARC::Record namespace. Additionally it inherits from MARC::File and includes encode(), decode, and _next() routines, making it compatible with MARC::Batch.

SEE ALSO ^

MARC::Record::Generic

Format inspired by http://dilettantes.code4lib.org/blog/2010/09/a-proposal-to-serialize-marc-in-json

AUTHOR ^

Clay Fouts <cfouts@khephera.net>

COPYRIGHT & LICENSE ^

Copyright (c) 2012 PTFS/LibLime

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

syntax highlighting: