I'm trying to set up an Ajax callback using jQuery, and it's just not working. My Ruby code looks something like this:
return {:one => some_html, :two => more_html}.to_json
When it gets to the client jQuery bails saying "parse error". If I make it something really simple, like:
return {:one => 'Something', :two => 'Something else'}.to_json
Then it works just fine. I guess I'm just wondering how it is that a library whose only job is to create JSON, could create invalid JSON? Or is it something else?