As promised long ago on #code4lib, I've created a couple modules for
dealing with MARC data in JSON; consider this a request for comments.
- MARC::Record::JSON is a perl module that monkey-patches MARC::Record to
provide a "as_json_record" method. This is essentially the same model used
to ouput XML from MARC::Record, and has the advantage that you don't have to
modify any existing code other than putting in an extra 'use
MARC::Record::JSON; at the top of your file after 'use MARC::Record;'.
MARC::Record in a very gross way, but has a stronger split between control
and data fields.
The MARC::Record::JSON data structure itself is *not* round-tripable (order
of subfields within a field is not preserved), but makes for an
easy-to-work-with format in read-only situations that one would probably be
encountering within a web page.
The whole thing, along with some documentation and a couple sample pages
Any -- and I do mean *any* -- comments would be much appreciated.
Library Systems Programmer
University of Michigan Library