[openbiblio-dev] Some updates

Jim Pitman pitman at stat.Berkeley.EDU
Mon Oct 3 19:31:37 UTC 2011


Mark MacGillivray <mark.macgillivray at okfn.org> wrote:

> We made some biggish changes to the BibServer code last week, here is 
> an update:
> http://bibserver.okfn.org/2011/10/03/updates-to-the-bibserver/

Two things caught my eye:

>Collection records separated from actual records
>Every collection has a metadata record which were previously all stored in the same index with the collection records. These have now been separated out, so that collection records do not appear in normal search results. Collection metadata is still shown on result pages, and is available in the JSON responses. 
>
This is good. It is important to stick to the notion that collection records are just biblio records, describing a collection, and not in any sense 
containers of biblio records. 

>Collection metadata in the JSON responses
>A request for a JSON response will now include metadata, such as information about the collection the records belong to, where such metadata is available. This means the returned value will be a JSON object with various metadata keys, and the records will be available as objects in a list identified by the “records” key. 

This goes against what we decided before. We agreed before that a BibJSON dataset is *always* a JSON array, and not a JSON object, and that optionally a BibJSON dataset may contain a metadata record describing it as a first record.
There are several reasons for doing it this way. 

1) If the JSON dataset is a big one, you have to ingest the whole file to parse the metadata information, because it might come after the entire record set.
JSON objects do not have any order associated with their keys, so there is no way (that I am aware of) to insist in JSON that the meta info about the size of the array comes  before the arrary of records. 

2) For simplicity, a BibJSON dataset should always be the same kind of JSON structure. Either always an array, or always a list. Else any consumer of bibjson datasets must start by deciding which.

I have a Google Doc with further discussions of this issue. Anyone interested
in contributing to this discussion please let me know and I can add  you to
the participant list there.

many thanks

--Jim




More information about the openbiblio-dev mailing list