On Sat, Mar 6, 2010 at 1:57 PM, Houghton,Andrew <[log in to unmask]> wrote:
> A way to fix this issue is to say that use cases #1 and #2 conform to
> media type application/json and use case #3 conforms to a new media type
> say: application/marc+json. This new application/marc+json media type now
> becomes a library centric standard and it avoids breaking a widely deployed
> Web standard.
>
I'm so sorry -- it never dawned on me that anyone would think that I was
asserting that a JSON MIME type should return anything but JSON. For the
record, I think that's batshit crazy. JSON needs to return json. I'd been
hoping to convince folks that we need to have a standard way to pass records
around that doesn't require a streaming parser/writer; not ignore standard
MIME-types willy-nilly. My use cases exist almost entirely outside the
browse environment (because, my god, I don't want to have to try to deal
with MARC21, whatever the serialization, in a browser environment); it
sounds like Andy is almost purely worried about working with a MARC21
serialization within a browser-based javascript environment.
Anyway, hopefully, it won't be a huge surprise that I don't disagree with
any of the quote above in general; I would assert, though, that
application/json and application/mac+json should both return JSON (in the
same way that text/xml, application/xml, and application/marc+xml can all be
expected to return XML). Newline-delmited json is starting to crop up in a
few places (e.g. couchdb) and should probably have its own mime type and
associated extension. So I would say something like:
application/json -- return json (obviously)
application/marc+json -- return json
application/marc+ndj -- return newline-delimited json
In all cases, we should agree on a standard record serialization, though,
and the pure-json returns should include something that indicates what the
heck it is (hopefully a URI that can act as a distinct "namespace"-type
identifier, including a version in it).
The question for me, I think, is whether within this community, anyone who
provides one of these types (application/marc+json and application/marc+ndj)
should automatically be expected to provide both. I don't have an answer for
that.
-Bill-
|