search for: howtogeneratejson

Displaying 2 results from an estimated 2 matches for "howtogeneratejson".

2007 Aug 07
2
"badly formed JSON" exception
I tried to implement the "Rendering JSON in actions" example from http://wiki.rubyonrails.com/rails/pages/HowtoGenerateJSON : @headers["Content-Type"] = "text/plain; charset=utf-8" data = { :foo => ''bar'', :etc => ''rez'' } render :text => data.to_json When I try to decode this in javascript with transport.responseText.evalJSON(true); I get this error: S...
2006 Apr 17
0
doing synchronous JSON on rails
So I have found how to generate json in a rails app in the wiki (http://wiki.rubyonrails.com/rails/pages/HowtoGenerateJSON), what I have yet to figure out is how to make a synchronous call via json to rails so that I can block while fetching the information from a user request. context: I have used JSON on top of java in the past, and in order to make synchronous calls I had to do the following: 1) include json.js...