converting JSON to an object / dictionary / dynamic
Posted
by benpage
on Stack Overflow
See other posts from Stack Overflow
or by benpage
Published on 2010-05-20T06:37:01Z
Indexed on
2010/05/20
6:40 UTC
Read the original article
Hit count: 498
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.
© Stack Overflow or respective owner