You just need to have the objects as they are represented in JSON, like these:
public class GridFilter { public string GroupOp { get; set; } public IEnumerableRules { get; set; } } public class GridFilterRule { public string Field { get; set; } public string Op { get; set; } public string Data { get; set; } }
Then all you need to do is this:
GridFilter filter = new JavaScriptSerializer().Deserialize(filters);
And your object structure will be created and filled from a JSON string.
No comments:
Post a Comment