Extending the Suggestions 1.0 Extension json response

62 views
Skip to first unread message

Matt Nathan

unread,
Oct 3, 2011, 6:52:00 AM10/3/11
to opens...@googlegroups.com
Hi all, 

Hopefully this is a quick question related to extending the search suggestions extension response.

The specification for the extension says that the result in format application/x-suggest+json should be an array which should have 4 entries each of which are defined in the spec. I'm attempting to write a new search suggestion service that has more information than that which should be useful to the application I am writing to help disambiguate the responses. Is it legal with regards to the spec to include extra entries in the top level array response.

As an example I might want to return a thumbnail for each of the suggestions:
Response = [
  "Bob", 
  ["Bobby", "Bob The Cat"], 
  ["My Neighbour", "My Pet"], 
]

Would this be a valid Suggestions 1.0 response?

Tatham Oddie

unread,
Oct 3, 2011, 10:36:48 AM10/3/11
to opens...@googlegroups.com

Hi Matt,

 

Internet Explorer’s search implementation supports both JSON and XML formatted suggestions:

 

http://msdn.microsoft.com/en-us/library/cc848862(VS.85).aspx#dev_searchsuggestion

 

The JSON format they use is the same standard you are referring to.

 

All of their richer examples (thumbnails and the like) use the XML format, which they defined themselves:

 

http://msdn.microsoft.com/en-us/library/cc891508(v=VS.85).aspx

 

It’s not a direct answer to your question – I’m not qualified enough to give one – but it indicates to me that IE as a client does not expect the JSON formatted suggestions to contain any more information that is defined in the original spec.

 

Hope that helps.

 

 

-- Tatham

--
You received this message because you are subscribed to the Google Groups "OpenSearch" group.
To view this discussion on the web visit https://groups.google.com/d/msg/opensearch/-/I9IaMJTctI4J.
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.

Matt Nathan

unread,
Oct 4, 2011, 4:39:01 AM10/4/11
to opens...@googlegroups.com
Thanks for the quick reply, Tatham.

I guess I will have to try it out. I'm not expecting any of the third party clients to be able to make use of the extra information, not breaking when it's there will be good enough for me.

Thanks again
Reply all
Reply to author
Forward
0 new messages