title: JSON C# .NET Compile Class Name
body: <p>I am working on a C# project however I am in need of some advice.</p>
  
  <p>I am presently posting to my site:</p>
  
  <pre><code>{Tags : 'App', Limit : '10' }
  </code></pre>
  
  <p>And it can cast this to the following class</p>
  
  <pre><code>[Serializable]
  public class MiloFilter
  {
      public string Tags { get; set; }
      public string Limit { get; set; }
  }
  </code></pre>
  
  <p>However what I am wanting to accomplish is that I would like to post my JSON like this:</p>
  
  <pre><code>{ MiloFilter : {Tags : 'SomeTag', Limit : '1' }}
  </code></pre>
  
  <p>However when I try and parse it using the following method it fails.</p>
  
  <pre><code>var js = new System.Web.Script.Serialization.JavaScriptSerializer();
  var miloFilter = js.Deserialize&lt;MiloFilter&gt;(bodyText);
  </code></pre>
  
  <p>How can I acomplish this?</p>