title: JSON.parse() not working even though JSON string is valid
body: <p>I am trying to post a form through AJAX jQuery. The PHP script to which it points returns a JSON encoded array. But, at the receiving end on the main page <code>JSON.parse()</code> is not working.</p>
  
  <p>Please suggest if I am missing on some file types which need to be included</p>
  
  <p>Here is my code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt; script type = "text/javascript" &gt;
    $(document).ready(function() {
      $("#send").submit(function() {
        //$("#submit_form").html('');
        $("#modal-text2").html("&lt;img src=" + "img/loader1.gif " 
                + "/&gt;&lt;/br&lt;/br&gt;&lt;h4&gt;DATA VALIDATION IN PROCESS !!! PLEASE WAIT&lt;/h4&gt;");
        $("#myModal2").modal('show');
  
        $.post($("#send").attr("action"), $("#send").serialize(), function(data) {
          var decode = JSON.parse(data);
          if (decode.err &gt; 0) {
            alert("Hi");
          }
        });
  
        //Important. Stop the normal POST
        return false;
      });
    }); 
  &lt; /script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The JSON encoded array which is being sent back by the PHP script is:</p>
  
  <pre class="lang-json prettyprint-override"><code>{"err":8,"er1":1,"er3":1,"er4":1,"er5":1,"er6":1,"er7":1,"er8":1,"er9":1,"error1":"First Name is Required","error3":"Last Name is Required","error4":"Email is Required","error5":"Please Select a Gender","error6":"Date of Birth is Required","error7":"Mobile No is Required","error8":"Password is Required","error9":"Please Fill The Captcha"}
  </code></pre>