> From: Code for Libraries [mailto:code4...@listserv.nd.edu] On Behalf Of
> Benjamin Young
> Sent: Friday, March 05, 2010 09:26 AM
> To: CODE4LIB@LISTSERV.ND.EDU
> Subject: Re: [CODE4LIB] Q: XML2JSON converter
> 
> If you're looking at putting MARC into JSON, there was some discussion
> of that during code4lib 2010. Johnathan Rochkind, who was at code4lib
> 2010 blogged about marc-json recently:
> http://bibwild.wordpress.com/2010/03/03/marc-json/
> He references a project that Bill Dueber's been playing with for a
> year:
> http://robotlibrarian.billdueber.com/new-interest-in-marc-hash-json/
> 
> All told, there's growing momentum for a MARC in JSON format to be
> created, so you might jump in there.

Too bad I didn't attend code4lib.  OCLC Research has created a version of MARC 
in JSON and will probably release FAST concepts in MARC binary, MARC-XML and 
our MARC-JSON format among other formats.  I'm wondering whether there is some 
consensus that can be reached and standardized at LC's level, just like OCLC, 
RLG and LC came to consensus on MARC-XML.  Unfortunately, I have not had the 
time to document the format, although it fairly straight forward, and yes we 
have an XSLT to convert from MARC-XML to MARC-JSON.  Basically the format I'm 
using is:

[
  ...
]

which represents a collection of MARC records or 

{
  ...
}

which represents a single MARC records that takes the form:

{
  leader : "01192cz  a2200301n  4500",
  controlfield :
  [
    { tag : "001", data : "fst01303409" },
    { tag : "003", data : "OCoLC" },
    { tag : "005", data : "20100202194747.3" },
    { tag : "008", data : "060620nn anznnbabn          || ana     d" }
  ],
  datafield :
  [
    {
      tag : "040",
      ind1 : " ",
      ind2 : " ",
      subfield :
      [
        { code : "a", data : "OCoLC" },
        { code : "b", data : "eng" },
        { code : "c", data : "OCoLC" },
        { code : "d", data : "OCoLC-O" },
        { code : "f", data : "fast" },
      ]
    },
    {
      tag : "151",
      ind1 : " ",
      ind2 : " ",
      subfield :
      [
        { code : "a", data : "Hawaii" },
        { code : "z", data : "Diamond Head" }
      ]
    }
  ]
}

Reply via email to