title: JSON parsing error in jQuery
body: <p>I am working on an in-house web app that uses Pylons on the backend, and I find myself in need of help figuring out why I'm getting JSON parsing errors.</p>
  
  <p>The Python routine on the server is effectively this:</p>
  
  <pre>
  import json
  
  # Other Pylons imports here
  
  # Snip...
  
  def validateMachine(self):
    retObj = {}
    retObj['ipv4addr'] = '10.10.15.9'
    retObj['netmask'] = '255.255.255.0'
    return json.dumps(retObj)
  </pre>
  
  <p>The client side has the following jQuery code:</p>
  
  <pre>
  $.ajax({
    type: "POST",
    url: "/kickstart/validateMachine",
    data: {theData: theValue},
    dataType: "json"
   })
   .done(function(data) {
    retObj = $.parseJSON(data);
    #Other code here
   });
  </pre>
  
  <p>When I execute the AJAX query, the server routine returns correctly, but the call to $.parseJSON() errors out. A screenshot of the Firebug console after it's errored out:
  <img src="https://i.stack.imgur.com/vWXfJ.png" alt="JSON error console"></p>
  
  <p>The response appears to be valid strict JSON, so my question is two-fold: why is it not parsing correctly, and how can I get it to do so? It's my understanding that jQuery is (correctly) attempting to use the browser's native JSON parser in this case - can I somehow override that and tell jQuery to not use the native parser?</p>