title: JSON parse error with ajax response string
body: <p>I have been working on this issue and i have searched for the solution in the web and stackoverflow, but I cant get whats the error exactly.</p>
  
  <p>this is the json string coming from the server through the ajax call.</p>
  
  <pre><code>{root:{name: "root",description: "root description",checked: false,1:{name: "item1",description: "item1 description",checked: true,1.1:{name: "item1.1",description: "item1.1 description",checked: true}}, 2:{name: "item2",description: "item2 description",checked: true}}}
  </code></pre>
  
  <p>using the below code i am getting the string after <code>xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200</code> </p>
  
  <pre><code>var aData;
          try{
          aData =JSON.parse(xmlhttp.responseText);
          }
          catch(err){
          alert(err);
          }
  </code></pre>
  
  <p>it shows the error like</p>
  
  <pre><code>Json.parse expected property name or '}'
  </code></pre>
  
  <p>but if use eval() function it works fine</p>
  
  <pre><code>var aData;
          try{
          aData =eval('(' + xmlhttp.responseText + ')');
          }
          catch(err){
          alert(err);
          }
  </code></pre>
  
  <p>please exaplin what is the error here.</p>
  
  <p>Thanks.</p>
  
  <p>EDIT:</p>
  
  <p>I have checked the string in json viewer and its worked fine.
  http://jsonviewer.stack.hu/">
  <img src="https://i.stack.imgur.com/NSsq8.png" alt="JSON view"></p>