converting JSON to an object / dictionary / dynamic
- by benpage
I'm currently using jqGrid to display data. Part of jqGrid's interface will give you search options, posting back the search details in a JSON string, for example:
{"groupOp":"AND","rules":[{"field":"PersonID","op":"eq","data":"123"},{"field":"LastName","op":"eq","data":"Smith"}]}
(meaning i'm searching for personID = 123, and LastName = 'Smith')
so what i'm hoping to do is somehow convert that back into something i can use server-side.
Does anyone have a solution for this that may convert it back into an object of some kind? My current solution would be to convert into xml, parse with linq and create instances of my own 'search' class with a 'rules' collection.