title: Ajax success callback not getting called on 200 network response
body: <p>I have a simple HTML page which loads jquery 3.3.1 and external script file script.js. I am running a simple node <a href="https://github.com/indexzero/http-server" rel="nofollow noreferrer">http-server</a> which serves the static page. data.json in also in at same folder of HTML file. But when below ajax call is done, I can see request is successful in network call but, success call back of ajax call is never getting called. why?<a href="https://i.stack.imgur.com/lD9iC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lD9iC.png" alt="enter image description here"></a></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>$( document ).ready(function() { 
  
      // Get data from json file        
     $.ajax({
      url: 'data.json',
      dataType: 'json',
      success: function (data) {
          console.log(data);        
      },
     error: function (xhr) { 
      alert('Error: ' + xhr.statusText); 
     }
  });
      
      
      
      
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;BW Chart&lt;/title&gt;
      &lt;script src="jquery-3.3.1.min.js"&gt;&lt;/script&gt;
      &lt;script src="script.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I can see it's calling error function but why even on status 200 its calling error function</p>
  
  <p><a href="https://i.stack.imgur.com/XxNw0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XxNw0.png" alt="enter image description here"></a></p>
  
  <p><strong>data.json</strong></p>
  
  <pre><code>[{name:"Object 1",
    hot:12,
    warm:5,
    cold:56,
    pHot:85,
    pWarm:52,
    pCold:25
   },{name:"Object 2",
    hot:14,
    warm:55,
    cold:23,
    pHot:89,
    pWarm:14,
    pCold:56
   },{name:"Object 3",
    hot:56,
    warm:45,
    cold:26,
    pHot:85,
    pWarm:41,
    pCold:36
   },{name:"Object 4",
    hot:15,
    warm:56,
    cold:47,
    pHot:25,
    pWarm:28,
    pCold:19
   },{name:"Object 5",
    hot:18,
    warm:52,
    cold:12,
    pHot:46,
    pWarm:52,
    pCold:73
   }]
  </code></pre>