After a medium-sized discussion on #code4lib, we’ve collectively decided that…well, ok, no one really cares all that much, but a few people weighed in.
The new format is: A list of arrays. If it’s got two elements, it’s a control field; if it’s got four, it’s a data field.
SO….it’s like this now.
{
"type" : "marc-hash",
"version" [...]
April 15, 2009 – 11:23 am
Why do I ever, ever think that MARC might not rely on order? I don’t know.
In any case, control fields will now be just an array of duples:
control: [
['001', 'value of the 001'],
['006', 'value of the 006']
['006', 'another 006']
}
In my first shot at MARC-in-JSON, which I appropriately (and prematurely) named MARC-JSON, I made a point of losing round-tripability (to and from MARC) in order to end up with a nice, easy-to-work-with data structure based mostly on hashes. “Who really cares what order the subfields come in?” I asked myself.
Well, of course, it turns [...]