title: How to pass json as object to ASP.NET MVC controller?
body: <p>I have an action</p>
  
  <pre><code>[HttpGet]
  public ActionResult Index(MyObject obj)
  {
     return View(obj);
  }
  </code></pre>
  
  <p>and an object:</p>
  
  <pre><code> [JsonObject(MemberSerialization = MemberSerialization.OptIn)]
   public class MyObject
   {
      [JsonProperty(PropertyName = "someString")]
      public String SomeString
      {
          get { return _someString; }
          set { _someString = value; }
      }
  
      [JsonProperty(PropertyName = "someDictionary")]
      public IDictionary SomeDictionary
      {
          get { return _someDictionary; }
          set { _someDictionary = value; }
      }
  
      public MyObject()
      {
      }
  
      private String _someString;
      private IDictionary _someDictionary;
    }
  </code></pre>
  
  <p>I want to pass this object to action by url. So I create url:</p>
  
  <pre><code>String url =  controller.Url.Action("Index", "SomeController");
  url += "?obj=" + JsonConvert.SerializeObject(myObjectInstance);
  </code></pre>
  
  <p>It's create me an url with json, but when I use it - the object in url is null.</p>
  
  <p>Can anybody help me?</p>
  
  <p>Thanks!</p>
  
  <p><strong>UPDATED:</strong>
  Share instance of my MyObject as reaction to comments:</p>
  
  <pre><code>MyObject myObjectInstance = new MyObject ();
  myObjectInstance.SomeString = "Hello";
  myObjectInstance.SomeDictionary = new Dictionary&lt;String, Object&gt; 
  {
     {"firstKey","value"}, 
     {"secondValue",5}
  }
  </code></pre>