# Blog

## OpenSearch Formats for Review

thammond – 2009 July 23

In Search

In an earlier post I talked about using the PAM (PRISM Aggregator Message) schema for an SRU result set. I have also noted in another post that a Search Web Service could support both SRU and OpenSearch interfaces. This does then beg the question of what a corresponding OpenSearch result set might look like for such a record.

Based on the OpenSearch spec and also on a new Atom extension for SRU, I have contrived to show how a PAM record might be returned in a coomon OpenSearch format. Below I offer some mocked-up examples for each of the following formats for review purposes:

• ATOM
• JSON

Just click the relevant figure for a text rendering of each result format for the following phrase search:

In this example we imagine that two records have been requested. (The example formats also include navigational links as per the OpenSearch spec examples.)

Note that the JSON example closely follows the ATOM schema with a couple of main deviations:

• Repeated elements are gathered together in an array (e.g. “entry”, “dc:creator”)
• Attributes are broken out alongside their parent elements (e.g. “rel”, “href”)

It would be interesting to hear what readers think of these examples - especially the JSON format.

<td>
<a href="http://nurture.nature.com/opensearch/demo/solar2-atom.txt"><img alt="solar2-atom.jpg" border="0" width="159" height="309" src="/wp/blog/images/solar2-atom.jpg" /></a>
</td>

<td>
<a href="http://nurture.nature.com/opensearch/demo/solar2-json.txt"><img alt="solar2-json.jpg" border="0" width="159" height="309" src="/wp/blog/images/solar2-json.jpg" /></a>
</td>

<th>
ATOM
</th>

<th>
JSON
</th>


(Click image to get text format.)