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