title: Parsing JSON object with $.parseJSON returns null
body: <p>I am requesting a JSON response via <code>$.ajax</code> in my rails project.</p>
  
  <pre><code>jQuery -&gt;
    testAjax()
  
  
  testAjax = -&gt;
    $.ajax
      url: "/gmap/test"
      data: "id=2"
      type: "GET"
      dataType: "json"
      complete: (data_response) -&gt;
        result = $.parseJSON(data_response)
        alert(result.name)
  </code></pre>
  
  <p>I seem to get a correct json string back (according to Firebug console), which looks like this:</p>
  
  <pre><code>{"name":"Space Needle","latitude":47.620471,"longitude":-122.349341}
  </code></pre>
  
  <p>However, I get an error complaining "TypeError: result is null"</p>
  
  <p>If I use</p>
  
  <pre><code>alert(data_response.responseText)
  </code></pre>
  
  <p>in the <code>complete</code> function, I get the json string. So the problem seems to be the parsing. (???)</p>