title: Jquery getJSON not working, but ajax does
body: <p>I have an issue that is bugging me, though it is not stopping me since I have a work-around. I'm trying to do an ajax call to a page method I have on an aspx page. I need to get json back, but the WebMethod <code>GetGender</code> is never called, unless I use an <code>$.ajax</code> call.</p>
  
  <p>So, this WORKS:</p>
  
  <pre><code>    $.ajax({
          type: "POST",
          url: "StudentFunctions.aspx/GetGender",
          data: "{}",
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function(msg) {
              var data = google.visualization.arrayToDataTable(msg.d);
              var options = {
                title: 'Gender',
                height: '5000px'
              };
  
              var chart = new google.visualization.PieChart(document.getElementById("chart_div"));
              chart.draw(data, options);
          }
      }); 
  </code></pre>
  
  <p>But, none of the below work:</p>
  
  <pre><code>$.get("StudentFunctions.aspx/GetGender", function(msg) { 
          alert(msg)
       }, "json");
  
  $.post("StudentFunctions.aspx/GetGender", function(msg) { 
          alert(msg)
       }, "json");
  
  $.getJSON("StudentFunctions.aspx/GetGender", function(msg) { 
          alert(msg)
       });
  </code></pre>
  
  <p>The three functions above doesn't even trigger the .Net function, but if I remove the "json" part from <code>$.post</code> and <code>$.get</code>, they at least calls the back-end function, but of course, doesn't return json.</p>
  
  <p>Also, another question that I feel foolish for not understanding, but when I get the json response in the <code>$.ajax</code> function, what does that object (here called <code>msg</code>) look like? <code>msg.d</code> does the trick for me, but I don't know why. Is there a specification somewhere?</p>