Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a Google Search Appliance / Mini output JSON/JSONP?

Using Google Mini for a website that needs output from the Google Mini in a JSON/JSONP format for front-end querying purposes. Google Mini does publish an XML feed that could potentially be used by a middle process to convert to JSON/JSONP.

Can Google Search Appliance / Mini output to JSON/JSONP using a plug-in, modification to an XSLT template, or other unknown method?

Solutions discovered

  1. Seems like digging through code.google.com reveals that GSA/Mini does not have a method to output in the JSON/JSONP format without using XSLT to create the feed. It is a matter of creating this XSLT to do the conversion.
  2. Other option is to create a server-side script using available technology (PHP?) to retrieve the XML from GSA/Mini and convert the feed to JSONP upon request from the Front-end (AJAX). Downside is the increased overhead in this call.

Update 10/8/2010

Created a Google Mini frontend that generates a JSONP response.

like image 285
Riley Avatar asked Dec 29 '22 16:12

Riley


1 Answers

I had the same problem trying to get JSON and JSONP. The solution worked in general on all other browsers, but IE. I could not change the mime-type to something other than text/html since that was global in GSA. Created an XSLT to solve that problem for browsers like IE which will not allow content to be returned due to a security feature ( IE – SEC7112 )

https://github.com/kjonnala/gsa_template

Hope that helps.

like image 51
Developer Avatar answered Dec 31 '22 05:12

Developer