javascript - jQuery can't parse JSON built with Ruby-JSON -
I am trying to set up an Ajax callback using jQuery, and it's not working right now. My Ruby Code looks like this:
Return {: one = & gt; Some_html ,: 2 = & gt; More_html} .to_json
When the customer goes to the client, say "parse error". If I make it something very simple, such as:
return {: one = & gt; 'Some',: 2 = & gt; 'anything else'}. To_json
Then it works fine. I think I am wondering how it is that a library whose only work is going to be JSON, can make an invalid JSON? Or is it something else?
Is it something HHL & amp; More_html contains characters in it that are interfering with JSON's parsing of JSON? Have you looked at the AJAX response and made sure it's a valid JSON?
Comments
Post a Comment