title: Ajax Json Parse Error in jQuery
body: <p>I am getting the following parse error from the Ajax call.
  "SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data"</p>
  
  <pre><code>               $.ajax({
                          type: "POST",
                          url: "QueryOrder",
                          data: dataString,
                          dataType: "json",
                          success: function(
                              data) {;
                              alert("I am in Success");
                              alert(data);
  
                          },
                          error: function(jqXHR,
                              textStatus,
                              errorThrown) {
                              alert("Error Return from Ajax");
                              alert(jqXHR
                                  .getResponseHeader('Content-Type'));
                              alert(jqXHR.responseText);
                              alert(jqXHR);
                              alert(errorThrown);
                              alert(textStatus);
                          }
                      }); //end of Ajax call
  </code></pre>
  
  <p>I have verified the json object which is getting generated in the servlet code and its valid</p>
  
  <p>{"orderObj":[{"FIRST_NAME":"John","LAST_NAME":"Mkay"}]}</p>
  
  <p>and response.setContentType("application/json"); is used to set the response.</p>
  
  <p>I have used tried the following jQuery lib versions</p>
  
  
  
  
  
  <p>and getting the same parse eof error.</p>
  
  <p>I have also tried changing the dataType to 'Json', 'text', 'json/text' and even removing the dataType parameter and nothing is working. Please let me know how to resolve this issue</p>