title: Javascript- XML syntax error in ajax request $.getJSON in Firefox
body: <p>Hello I have an ajax request, which gets data as json as callback. The content-type is not displayed in the response header and i get null when i check in the console. My code:</p>
  
  <pre><code>$.ajaxSetup({
      cache: false
      beforeSend: function (jqXHR) {
          ...
      },
      complete: function (jqXHR) {
          ....
      }
  });
  
  function loadData(div, url) {
      $('#' + div).jstree({
          core: {
              data: function (node, cb) {
                  $.getJSON(url + node.id)
                      .done(function (data, status, xhr) {                        
                          cb.call(this, data);
                 .......
  </code></pre>
  
  <p>The response looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/ioyNE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ioyNE.png" alt="Response"></a></p>
  
  <p>And i get XML processing error: syntax error</p>
  
  <p>I tried adding <code>'Content-Type': 'appplication/json'</code> to the <code>$.ajaxSetup</code> but there was no change. How can i handle this error. Should it be in the ajaxsetup or in the <code>$.getJSON</code> function.</p>