title: jQuery parseJSON error
body: <p>I'm trying to parse a JSON string served up from my Sinatra/DataMapper backend, but am getting an error from <code>$.parseJSON</code>. The offending line is:</p>
  
  <pre><code>var data = $.parseJSON('{"id":1249,"ssid":"asdf","mac_addr":"12:34:56:78:90:12","description":"&lt;a href=\"http://www.google.com\"&gt;Google&lt;/a&gt;","gps_lat":"53.345036547354","gps_lng":"-6.2576787407226675","location":"","authentication_method":"WPA2-PSK","password":"","xml_id":"default","access_network_area_id":37}');
  </code></pre>
  
  <p>And the error appearing in Firebug is:</p>
  
  <pre><code>SyntaxError: JSON.parse: expected ',' or '}' after property value in object
  </code></pre>
  
  <p>Since I can't for the life of me see any missing ',' or '}' symbols (and there shouldn't be unless the ruby to_json method is broken), I'm assuming this is an escaping issue. But which characters do I need to escape to fix it?</p>
  
  <p>EDIT:</p>
  
  <p>My backend is Sinatra (Ruby), with DataMapper as the ORM. The JSON string is being generated in the controller as <code>@data = model.to_json</code>, and is being handled in the view as <code>$.parseJSON('#{@data}')</code>.</p>