title: Retrieve plain text with jquery ajax and convert to JSON
body: <p><strong>Update:</strong> the following works fine in IE8, but data comes back null in firefox:</p>
  
  <pre><code>$.getJSON('myUrl/solr/select/?q=citystate%3ASea*&amp;version=2.2&amp;start=0&amp;rows=3&amp;indent=on&amp;wt=json&amp;fl=citystate', function(data) {
    alert(data.response.docs[0].citystate);
  });
  </code></pre>
  
  <p>I have a jetty server that generates json data as plain text - here are what the headers look like:</p>
  
  <pre><code>Last-Modified   Wed, 06 Oct 2010 23:22:27 GMT
  Etag    "OTI5YWMzYzFkNDgwMDAwMFNvbHI="
  Content-Type    text/plain; charset=utf-8
  Content-Length  565
  Server  Jetty(6.1.3)
  </code></pre>
  
  <p>Here is an example of the output:</p>
  
  <pre><code>{
   "responseHeader":{
    "status":0,
    "QTime":1,
    "params":{
      "fl":"citystate",
      "indent":"on",
      "start":"0",
      "q":"citystate:Sea*",
      "wt":"json",
      "version":"2.2",
      "rows":"10"}},
   "response":{"numFound":233,"start":0,"docs":[
      {
       "citystate":"Seaboard, AL"},
      {
       "citystate":"Seale, AL"},
      {
       "citystate":"Seacliff, AL"},
      {
       "citystate":"Sealy Springs, AL"},
      {
       "citystate":"Searcy, AL"},
      {
       "citystate":"Searight, AL"},
      {
       "citystate":"Searles, AL"},
      {
       "citystate":"Seasha, AL"},
      {
       "citystate":"Searcy, AR"},
      {
       "citystate":"Seaton, AR"}]
   }}
  </code></pre>
  
  <p>I want to retrieve this data using a jquery ajax call like this:</p>
  
  <pre><code>$.ajax({
    type: "GET",
    url: "myUrl/?q=citystate%3ASea*&amp;version=2.2&amp;start=0&amp;rows=10&amp;indent=on&amp;wt=json&amp;fl=citystate",
    dataType: "json",
    contentType: "text/plain; charset=utf-8",
    success: function(data, textStatus){
      alert("data: " + data);
    },
    error: function(data){
      alert("error");
    }
  });
  </code></pre>
  
  <p>However, the result I get back is always null.  What am I doing wrong?</p>