JSON format for the Opensearch Description Document

225 views
Skip to first unread message

sgg

unread,
Sep 6, 2011, 9:13:53 AM9/6/11
to OpenSearch
In the Opensearch definition of a description document (http://
www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_description_document)
all the examples are serialized as XML. I could not find either a
clear statement that it was a normative requirement that description
document MUST be in XML, nor could I find any examples of alternative
serializations (eg a JSON serialization of the description document).

Hence my question, is it a requirement that the description document
appear in XML, or, is it permissible, perhaps based on the http
Accept: header in the request, to serialize the description document
in JSON (or other serialization format)? If this is permissible, does
anyone have an example JSON serialized description document?

thanks in advance
sgg

Andrew Turner

unread,
Sep 6, 2011, 12:26:08 PM9/6/11
to opens...@googlegroups.com
Hi sgg,

The nice thing about HTTP is that you can provide this endpoint in
addition to the XML version without getting in the way. This could be
based on the Accepts Header and possibly the suffix for an added
bonus. I agree that JSON would be nice for client widgets that may
land upon the page.

While this probably won't be understood by any/many clients it's
usually a good idea to demonstrate value before trying to change it
for changes-sake.

Andrew

> --
> You received this message because you are subscribed to the Google Groups "OpenSearch" group.
> To post to this group, send email to opens...@googlegroups.com.
> To unsubscribe from this group, send email to opensearch+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/opensearch?hl=en.
>
>

--
Andrew Turner
mobile: 248.982.3609
and...@fortiusone.com
http://highearthorbit.com

http://geocommons.com           Helping build the Geospatial Web
Introduction to Neogeography - http://oreilly.com/catalog/neogeography

Ed Summers

unread,
Sep 6, 2011, 2:52:35 PM9/6/11
to opens...@googlegroups.com
We use OpenSearch w/ JSON at the Library of Congress using JSON
similar in spirit to JSON-C from Google. Here's an example description
document:

http://chroniclingamerica.loc.gov/search/pages/opensearch.xml

and a sample search:

http://chroniclingamerica.loc.gov/search/pages/results/?proxtext=ducks&format=json

You might also want to check out the Atom inspired JSON that the
activitystrea.ms [2] folks have come up with. It might actually be
nice to get some JSON examples into the OpenSearch docs I guess?

//Ed

[1] http://code.google.com/apis/youtube/2.0/developers_guide_jsonc.html#Understanding_JSONC
[2] http://activitystrea.ms/specs/json/1.0/

Julien Silland

unread,
Sep 6, 2011, 6:09:26 PM9/6/11
to opens...@googlegroups.com
Hi all,

I'm part of the team that has worked on providing a JSON output for the Google CustomSearch API (http://code.google.com/apis/customsearch/v1/overview.html). The API comes in two flavors: XML and JSON. The XML format is OpenSearch compliant and the JSON format is my attempt at porting the OpenSearch results spec to JSON.

We do not yet provide a description document at all, but I have a pending changelist that fixes that for both XML and JSON. I'd be happy to talk about the JSON format with someone in charge of the spec before we launch this. New-generation Google APIs generally use an 'alt' parameter to specify the deisred output format, but this is completely orthogonal to the actual definition of the format. With the growing popularity of JSON, it'd be great to get that normalized at some point in the near future.

Thanks,
-jsi

Ray Denenberg

unread,
Sep 16, 2011, 5:16:53 PM9/16/11
to OpenSearch
I have a request, to whoever maintains this listserv. Can you remove the
message-numbers from the subject?

e.g. the "426" in "[opensearch:426] JSON format for the Opensearch
Description Document"

I don't know if these message numbers serve any purpose, but they do hinder
the ability to organize messages by subject.

I don't know if that's easy to do or not, I know of no other listserv that
numbers messages in this manner. If it is easy to remove them, and if the
don't really serve any purpose, then I would appreciate if you could.

Thanks.

--Ray

DeWitt Clinton

unread,
Sep 26, 2011, 3:51:54 PM9/26/11
to opens...@googlegroups.com
Sorry for the delay, I missed this in the moderation queue.

I went ahead and removed both the number and the [opensearch] prefix entirely.  Thanks for the suggestion, Ray.

-DeWitt

Tatham Oddie

unread,
Oct 5, 2011, 10:45:23 PM10/5/11
to opens...@googlegroups.com
As an alternative, just use "[opensearch:" as your rule. (Note the lack of closing bracket.)


-- Tatham

Thanks.

--Ray

--

Tatham Oddie

unread,
Oct 5, 2011, 10:46:15 PM10/5/11
to opens...@googlegroups.com
Ah. Just realised that you probably meant it breaks conversation grouping.

-- Tatham


-----Original Message-----
From: Tatham Oddie
Sent: Thursday, 6 October 2011 1:45 PM
To: 'OpenSearch'
Subject: RE: listserv message numbers

As an alternative, just use "[opensearch:" as your rule. (Note the lack of closing bracket.)


-- Tatham


-----Original Message-----
From: opens...@googlegroups.com [mailto:opens...@googlegroups.com] On Behalf Of Ray Denenberg
Sent: Saturday, 17 September 2011 7:17 AM
To: 'OpenSearch'
Subject: listserv message numbers

Thanks.

--Ray

--

Reply all
Reply to author
Forward
0 new messages