title: Parseerror with Json and Jquery
body: <p>I have the following Json:</p>
  
  <pre><code>[{"label":"75001","value":"75001"},
  {"label":"75002","value":"75002"},
  {"label":"75003","value":"75003"},
  {"label":"75004","value":"75004"},
  {"label":"75005","value":"75005"},
  {"label":"75006","value":"75006"},
  {"label":"75007","value":"75007"},
  {"label":"75008","value":"75008"},
  {"label":"75009","value":"75009"}]
  </code></pre>
  
  <p>It causes a parseerror in JQuery.</p>
  
  <p>I actually use the jquery.ui autocomplete control as follows:</p>
  
  <pre><code>jQuery(document).ready(function() {
              jQuery("#accountPostcode").autocomplete({
                  source : function(request, response) {
                      var jqxhr = jQuery.ajax({
                          url : "utils/JSonPostcodesWithQueryParam",
                          dataType : "json"
                      }).fail(function() { 
                          console.log("error:");
                          console.log(jqxhr.statusText);
                      });
                  },
                  minLength : 2
              });
          });
  </code></pre>
  
  <p>I am not sure what I am getting wrong as my Json seems correct...</p>
  
  <p>Any one has any clue?</p>
  
  <p>EDIT:</p>
  
  <p>Here is what generates the Json:</p>
  
  <pre><code>package com.bignibou.web.pages.utils;
  
  import java.util.List;
  
  import org.apache.tapestry5.EventConstants;
  import org.apache.tapestry5.StreamResponse;
  import org.apache.tapestry5.annotations.OnEvent;
  import org.apache.tapestry5.annotations.RequestParameter;
  import org.apache.tapestry5.ioc.annotations.Inject;
  import org.apache.tapestry5.util.TextStreamResponse;
  
  import com.bignibou.domain.utils.PostcodeJson;
  import com.bignibou.service.AccountService;
  import com.google.gson.Gson;
  
  public class JSonPostcodesWithQueryParam {
  
      @Inject
      private AccountService service;
  
      @OnEvent(EventConstants.ACTIVATE)
      StreamResponse loadPostcodes(@RequestParameter(value = "term") String beginningOfPostcode) {
          Gson gson = new Gson();
          List&lt;PostcodeJson&gt; postcodes = service.loadPostcodes(beginningOfPostcode);
          return new TextStreamResponse("application/json","UTF-8", gson.toJson(postcodes));
      }
  }
  </code></pre>