title: Send JSON using Ajax in Querystring along with regular params
body: <p>Is it possible to include a simple JSON string at the end of a querystring using Ajax GET? I'm using MVC and sending from the View to the Controller. In the Controller I want to be able to do this:</p>
  
  <pre><code>public class myObj
  {
      public string Name { get; set; }
      public int Age { get; set; }
  }
  
  [AcceptVerbs(HttpVerbs.Get)]
  public JsonResult GetData(string Id)
  {
      // Get querystring parameter
      string a = Request["a"];
  
      // Create typed object
      if (Request["myObj"] != null)
      {
          JavaScriptSerializer jss = new JavaScriptSerializer();
          myObj myobj = null;
          myobj = jss.Deserialize&lt;myObj&gt;(Request["myObj"]);
      }
  
      ...
  }
  </code></pre>
  
  <p>In the View:</p>
  
  <pre><code>var myObj = '{ "Name" : "John", "Age" : "22" }';
  $.ajax({
      type: "GET",
      url: "/GetData/?Id=" + $("#Id").val(),
      dataType: "json",
      data: {
          a: $('#a').val(),
          myObj: myObj
      },
  
      ...
  
  });
  </code></pre>
  
  <p>I don't think my example above illustrates why I want to do this, but my question is whether or not this is possible. When the Ajax GET is executed <code>myObj</code> is always null in the Controller. I suspect it's because <code>data:</code> is creating a JSON already and myObj is not in the correct format, but I don't know how to fix this and can't seem to find an example showing how.</p>
  
  <p>If this combination is possible can someone point me to where my code is wrong?</p>