OCLC Developer Network

WorldCat Search API enhanced to include JSON output for library location

If you're a member of the OCLC Developer Network (aka, a member of the WC-DEVNET-L listserv community), then you already heard about this update awhile back. But I realized we hadn't posted it officially to the blog yet--so here we are. The JSON format option for library holdings data is helpful for WorldCat Search API-using developers who want to supply a list of nearby WorldCat libraries that hold the materials in question. The JSON holdings format provides some very brief bibliographic information along with structured data describing holding libraries, including the familiar values from the current XML response. Find more information on the JSON holdings format in the documentation. Additional recent enhancements to the WorldCat Search API include adding South African postal codes and fixes such as:

  • OCLC symbols that include "@" in the symbol name
  • the "any" relation operator
  • SRU errors with quotation marks

Any questions, comment here or of course, use the Developer Network listserv. And if you haven't joined, join today! Free, easy and a great resource to learn more about OCLC Web Services and share ideas, questions and concerns.

Comments

re: WorldCat Search API enhanced to include JSON output for libr

It looks like the json response does NOT contain the same information as the XML response? Or rather, it contains everything in the XML response, plus more?

If this is so... this starts getting confusing for developers. I would prefer if the json and XML responses were just two different serializations of the same info, I could use whichever was more convenient for my development environment, and get the same info either way. There's no reason a situation where xml is more convenient necessarily needs less information than a situation where json is convenient, right? It starts getting confusing to keep track of what information is available how, and inconvenient if you'd rather use one serialization format, but the info you need is only available in another.

It would be like saying, when we translate from Marc21 to MarcXML, we're going to throw out 20% of the marc fields, just to make marcxml different than marc21!

re: WorldCat Search API enhanced to include JSON output for libr

Jonathan,

Thanks for your feedback. You're right, in that the JSON response does differ from the XML one, and it does offer out more information. We did this for a couple of different reasons--one was to help make the mobile apps using the WorldCat Search API deliver results faster, and the other was a sheer desire to support JSON.

We currently adhere our XML output to the ISO 20775 Holdings schema, which doesn't have a place for all the data being offered out right now through JSON. The JSON output is a serialization, as you point out, but replicating the information now included in the JSON response for library holdings in the XML response wouldn't be easy from the back end--even through we strongly share your desire for consistency and simplicity overall for the service.

So we definitely hear you, and have added your suggestion to update the XML response to the list of possible future enhancements. Any other suggestions to make the WorldCat Search API easier/better/faster to use, we're interested to hear all ideas.

Follow the OCLC Developer Network:

The OCLC Developer Network supports the use of OCLC Web Services—a set of tools and APIs that expose data and services for WorldCat and our member libraries and partner institutions or companies. learn more »

© 2010 OCLC Domestic and international trademarks and/or service marks of OCLC Online Computer Library Center, Inc. and its affiliates


Powered by Drupal, an open source content management system