title: local Ajax call success but no data returned
body: <p>I've created two projects in Visual Studio 2010 one is a Web Service and the other is a web application, I have a method on the web service as follows:</p>
  
  <pre><code>`[OperationContract]
      [WebInvoke(Method = "GET",
          ResponseFormat = WebMessageFormat.Json,
          BodyStyle = WebMessageBodyStyle.Wrapped,
          UriTemplate = "json/getData")]
      List&lt;Objects&gt; TestCall();`
  </code></pre>
  
  <p>Once I run the service I can happily type in the URL to get the JSON response:</p>
  
  <p><code>http://localhost:17258/RestService.svc/json/getData</code></p>
  
  <p>results in</p>
  
  <p><code>{"TestCallResult":[{"id":1,"name":"Title"},
  {"id":2,"name":"Title"},{"id":3,"name":"Title"},{"id":4,"name":"Title"}]}</code></p>
  
  <p>However in my web application when I try and make this Ajax call to get this response I get a success from the call but the JSON is null, here is my ajax call:</p>
  
  <pre><code>`$.ajax({
                  url: "http://localhost:17258/RestService.svc/json/getData",
                  type: "GET",
                  mimeType: "application/json",
                  dataType: "json",
                  cache: false,
                  success: function (json, status) {
                      alert("Success JSON=" + json + ", status=" + status);
                      var obj = jQuery.parseJSON(json);
                      for (var i = 0; i &lt;= obj.length; i++) {
                          alert(obj[i].id);
                      }
                  }
              });`                
  </code></pre>
  
  <p>I'm trying in FireFox and the json variable comes back as null, when debugging in IE debugger I can add a watch to the object and can see the object has the array underneath it, do I need to use json.TestCallResult instead or has anyone else seen this difference between IE and FireFox OR can someone say stop being a noob and do this...</p>
  
  <p>Thanks</p>