Print

Print


I've started work on a project that I'm envisioning partly as sort of
a JSON profile of METS optimized for access.

I've implemented this JSON format for search results in calisphere by
adding an rmode=json to the calisphere/oac branch of xtf.

Here is some documentation about it
  http://json4lib.readthedocs.org/en/latest/

And here is the code
   http://code.google.com/p/json4lib/source/browse/

This provides an API of sorts to calisphere which is being used to
power a slide show widget we are beta testing with contributors which
should be released in June.

Only simple image objects support full file access at this time, but I
have an idea of how to support complex objects in search results using
json references.  My intention is to use the same JSON format for
either a set of search results or a flattened set of nodes of a
complex object.

To see the JSON results, it is easiest to install JSONview for Firefox or Chrome

https://addons.mozilla.org/en-us/firefox/addon/jsonview/
https://chrome.google.com/extensions/detail/chklaanhfefbnpoihckbnefhakgolnmc

Do a search or browse in calisphere, say to

http://www.calisphere.universityofcalifornia.edu/browse/azBrowse/National+parks

add &rmode=json

http://www.calisphere.universityofcalifornia.edu/browse/azBrowse/National+parks&rmode=json

the callback parameter is also supported to allow cross domain access via JSONP

Here is a working example of the slideshow widget

http://cdn.calisphere.org/json4lib/slideshow/example.html

The slideshow widget is built using jQuery UI Dialog and the
PikaChoose slideshow library.

Here is how the JSONP is generated out of XTF (based on xml2json-xslt)
https://bitbucket.org/btingle/dsc-xtf/src/92c8607e3fed/style/crossQuery/resultFormatter/json/

The API and the widget are provided for the use of OAC/Calisphere
contributors on their own websites.  Nothing technical would stop
someone from using the JSON in other ways.  (I figure I could
whitelist referrers if unauthorized use becomes a problem).

I'm interested to hear any feedback; especially about the approach of
creating a javascript API (do_api.js) that provides "methods" to the
underlying JSON digital library object -- or my crazy arbitrarily
qualifiable dublin core implementation -- or any advice or concerns
about leaving the JSON feed wide open w/o any sort of API key.

Thanks -- Brian