As the author of one of the proposed JSON serialization strategies, let me
recommend that we let my proposal - known as "marc-hash" -- disappear quietly
into the ether :-)
I propose we get behind the MARC-in-JSON structure ([2]; also see [5]). It's
clean and as concise as it can be given what few rules we can count on in MARC.
It is also (a) no harder to implement or slower to parse/create than any other
marc-in-json propsoal and (b) has a structure which more easily lends itself to
JSON query languages (e.g., JSONQuery, JSONPath) such as those exposed by
CouchDB and other NoSQL datastores. The spec hosted at the OCLC [3] is
verbose/self-documenting (depending on your point of view) in the same was
MARC-XML is, with all the advantages and disadvantages that implies.
Note that as of this point, the marc-in-json spec goes as high as the Record
object. A set of records could be represented by, say, the obvious JSON-array
of Record objects (which may necessitate a JSON pull-parser if you've got a
bunch of them) or using some sort of End-of-Record delimiter - I'm a fan of
eliminating optional-whitespace newlines from the JSON and putting one JSON
object on each line ("newline-delimited JSON") for easy-peasy processing.
In addition to this branch now for Perl (Yea!), MARC-in-JSON is also already
baked into the standard Ruby[6] and PHP[7] MARC libraries, with a (relatively
crude) add-on available for the Java marc4j[8] library as well. (Python,
anyone?)
-Bill-
[5]
http://robotlibrarian.billdueber.com/sizespeed-of-various-marc-serializations-using-ruby-marc/
[6] https://github.com/ruby-marc (via the #to_hash method)
[7]
http://coffeecode.net/archives/231-File_MARC-0.6.0-now-offering-two-tasty-flavours-of-MARC-as-JSON-output.html
[8] https://github.com/billdueber/marc4j_extra_reader_writers
On 1/17/11 6:59 PM, "Galen Charlton" wrote:
Hi,
I've pushed a branch called marc-json [1] implementing MARC-in-JSON
support for MARC::Record. Besides hooking it up with MARC::Batch, at
this point I'd like to know if there are any real-world cases where
anybody has had occasion or desire to emit or handle JSONified MARC
with the Perl libraries and has any opinion about the other two
competing JSON MARC proposals [3] [4].
MARC-in-JSON support will be part of a feature release of
MARC::Record, 2.1; if anybody has anything pending that they'd like
in, please let me know.
[1]
http://marcpm.git.sourceforge.net/git/gitweb.cgi?p=marcpm/marcpm;a=shortlog;h=refs/heads/marc-json
[2]
http://dilettantes.code4lib.org/blog/2010/09/a-proposal-to-serialize-marc-in-json/
[3] http://www.oclc.org/developer/groups/marc-json-format-specification
[4]
http://robotlibrarian.billdueber.com/marc-hash-a-proposed-format-for-jsonyamlwhatever-compatible-marc-records/
Regards,
Galen
--
Galen Charlton
gmcha...@gmail.com