title: Syntax error when parsing JSON string
body: <p>I have a sample JSON with some part of my webpage rendered :</p>
  
  <pre><code>{"html": {"#data": "\n&lt;h2&gt;Data&lt;/h2&gt;\n&lt;div class="\&amp;quot;manufacturer-image\&amp;quot;"&gt;\n \n&lt;/div&gt;\n
  &lt;form action="\&amp;quot;/manage/update-manufacturer-data/3\&amp;quot;" method="\&amp;quot;post\&amp;quot;"&gt;\n \n 
  &lt;div class="\&amp;quot;field\&amp;quot;"&gt;\n &lt;div class="\&amp;quot;label\&amp;quot;"&gt;\n &lt;label for="\&amp;quot;id_name\&amp;quot;"&gt;Nazwa&lt;/label&gt;:\n 
  &lt;/div&gt;\n \n \n &lt;div class="\&amp;quot;error\&amp;quot;"&gt;\n 
  &lt;input id="\&amp;quot;id_name\&amp;quot;" name="\&amp;quot;name\&amp;quot;" maxlength="50" type="\&amp;quot;text\&amp;quot;"&gt;\n 
  &lt;ul class="\&amp;quot;errorlist\&amp;quot;"&gt;&lt;li&gt;Pole wymagane&lt;/li&gt;&lt;/ul&gt;\n &lt;/div&gt;\n \n &lt;/div&gt;\n\n 
  &lt;div class="\&amp;quot;field\&amp;quot;"&gt;\n &lt;div class="\&amp;quot;label\&amp;quot;"&gt;\n &lt;label for="\&amp;quot;id_image\&amp;quot;"&gt;Zdjecie&lt;/label&gt;:\n 
  &lt;/div&gt;\n \n \n &lt;div&gt;\n &lt;input name="\&amp;quot;image\&amp;quot;" id="\&amp;quot;id_image\&amp;quot;" type="\&amp;quot;file\&amp;quot;"&gt;\n 
  &lt;/div&gt;\n \n &lt;/div&gt;\n\n &lt;div class="\&amp;quot;field\&amp;quot;"&gt;\n &lt;div class="\&amp;quot;label\&amp;quot;"&gt;\n 
  &lt;label for="\&amp;quot;id_description\&amp;quot;"&gt;Opis&lt;/label&gt;:\n &lt;/div&gt;\n \n \n &lt;div&gt;\n 
  &lt;textarea id="\&amp;quot;id_description\&amp;quot;" rows="10" cols="40" name="\&amp;quot;description\&amp;quot;"&gt;&lt;/textarea&gt;\n &lt;/div&gt;\n \n 
  &lt;/div&gt;\n \n &lt;div class="\&amp;quot;buttons\&amp;quot;"&gt;\n &lt;input class="\&amp;quot;ajax-save-button" button\"="" type="\&amp;quot;submit\&amp;quot;"&gt;\n 
  &lt;/div&gt;\n&lt;/form&gt;"}}
  </code></pre>
  
  <p>This string is returned with ajax call and jQuery 1.6.1 throws an error :</p>
  
  <p><code>SyntaxError: JSON.parse: expected ',' or '}' after property value in object</code> </p>
  
  <p>in the following part of the code :</p>
  
  <pre><code>parseJSON: function( data ) {
      if ( typeof data !== "string" || !data ) {
          return null;
      }
      // Make sure leading/trailing whitespace is removed (IE can't handle it)
      data = jQuery.trim( data );
  
      // Attempt to parse using the native JSON parser first
      if ( window.JSON &amp;&amp; window.JSON.parse ) {
          console.warn('data: ', data);
          var ret;
          try{
              ret = window.JSON.parse(data);
          } catch(e){
              ret = {};
              console.warn(e);
          }
          return ret;
          //return window.JSON.parse( data );
      }
  </code></pre>
  
  <p>What am I missing here ?</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>I have parsed through the previous 'json' (which by the way was created with python's simplejson lib, so I wonder how can this be working anywhere) and now jsonlint shows, that I have proper JSON. Still the problem remains the same. The new string :</p>
  
  <pre><code>{"html": [{"#data": "\n&lt;h2&gt;Data&lt;/h2&gt;\n&lt;div class=&amp;quot;manufacturer-image&amp;quot;&gt;\n    \n&lt;/div&gt;\n&lt;form action=&amp;quot;/manage/update-manufacturer-data/4&amp;quot; method=&amp;quot;post&amp;quot;&gt;\n        \n    &lt;div class=&amp;quot;field&amp;quot;&gt;\n        &lt;div class=&amp;quot;label&amp;quot;&gt;\n            &lt;label for=&amp;quot;id_name&amp;quot;&gt;Nazwa&lt;/label&gt;:\n        &lt;/div&gt;\n        \n        \n            &lt;div class=&amp;quot;error&amp;quot;&gt;\n                &lt;input id=&amp;quot;id_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;name&amp;quot; maxlength=&amp;quot;50&amp;quot; /&gt;\n                &lt;ul class=&amp;quot;errorlist&amp;quot;&gt;&lt;li&gt;Pole wymagane&lt;/li&gt;&lt;/ul&gt;\n            &lt;/div&gt;\n        \n    &lt;/div&gt;\n\n    &lt;div class=&amp;quot;field&amp;quot;&gt;\n        &lt;div class=&amp;quot;label&amp;quot;&gt;\n            &lt;label for=&amp;quot;id_image&amp;quot;&gt;Zdjecie&lt;/label&gt;:\n        &lt;/div&gt;\n        \n        \n            &lt;div&gt;\n                &lt;input type=&amp;quot;file&amp;quot; name=&amp;quot;image&amp;quot; id=&amp;quot;id_image&amp;quot; /&gt;\n            &lt;/div&gt;\n        \n    &lt;/div&gt;\n\n    &lt;div class=&amp;quot;field&amp;quot;&gt;\n        &lt;div class=&amp;quot;label&amp;quot;&gt;\n            &lt;label for=&amp;quot;id_description&amp;quot;&gt;Opis&lt;/label&gt;:\n        &lt;/div&gt;\n        \n        \n            &lt;div&gt;\n                &lt;textarea id=&amp;quot;id_description&amp;quot; rows=&amp;quot;10&amp;quot; cols=&amp;quot;40&amp;quot; name=&amp;quot;description&amp;quot;&gt;&lt;/textarea&gt;\n            &lt;/div&gt;\n        \n    &lt;/div&gt;\n  \n    &lt;div class=&amp;quot;buttons&amp;quot;&gt;\n        &lt;input type=&amp;quot;submit&amp;quot; class=&amp;quot;ajax-save-button button&amp;quot; /&gt;\n    &lt;/div&gt;\n&lt;/form&gt;"}]}
  </code></pre>
  
  <p>EDIT2:
  Ok it looks, that JSOn leaving my backend is proper but dumb jQuery adds additional quotes around each '&quot;' which is kinda odd.</p>