title: What changed in jQuery 1.9 to cause a $.ajax call to fail with syntax error
body: <p>I'm making a REST DELETE call, which returns a 204. In jQuery 1.8.3 this works, and hits the request.done callback. But if I use 1.9 it goes to request.fail with a parsererror in the textStatus and a 'SyntaxError: Unexpected end of input' in the errorThrown.</p>
  <pre><code>remove = function (complete) {
              var self = this;
              var request = $.ajax({
                context: self,
                url: &quot;/v1/item/&quot; + itemId,
                dataType: &quot;json&quot;,
                type: &quot;DELETE&quot;
              });
              request.done(removeCallback);
              request.fail(function (xhr, textStatus, errorThrown) {
                  alert(errorThrown);
              });
              
          },
  </code></pre>
  <p>Anyone know what has changed in 1.9 that would cause this to fail, and what needs to change in order to fix it?</p>
  <p>So, answering my own question it looks like this is in fact the problem:</p>
  <p>From the <a href="http://jquery.com/upgrade-guide/1.9/#jquery-ajax-returning-a-json-result-of-an-empty-string" rel="noreferrer">jQuery upgrade guide</a></p>
  <blockquote>
  <h2>jQuery.ajax returning a JSON result of an empty string</h2>
  <p>Prior to 1.9, an ajax call that expected a return data type of JSON or JSONP would consider a return value of an empty string to be a success case, but return a null to the success handler or promise. As of 1.9, an empty string returned for JSON data is considered to be malformed JSON (because it is); this will now throw an error. Use the error handler to catch such cases.</p>
  </blockquote>
  <p>So, if remove the dataType</p>
  <pre><code>dataType: &quot;json&quot;,
  </code></pre>
  <p>It works in jQuery 1.8.3 and 1.9.</p>