Hello All,
I am writing a facebook application in ruby on rails, which requires google search in one page. I've implemented this using a simple RESTful interface as follows:
url = URI.parse( "http://ajax.googleapis.com/ajax/services/search/ local?v=1.0&q="+params[:keyword] ) req = Net::HTTP::Get.new(url.path+"?"+url.query) res = Net::HTTP.start(url.host, url.port) {|http| http.request(req) }
The response has a Content-Type of text/javascript; charset=utf-8. and in JSON format
So, I'm decoding the response into a hash as hash = ActiveSupport::JSON.decode(res.body)
But, the data still contains some special characters starting with \u (utf-8 characters)
How to decode them into html text in ruby?
Thanks in Advance, Prasad