hi,
I am passing an array from view to the controller using json.stringify() method.
That value is passing to the controller and that is in
"\"[{\\\"id\\\":1 "id\\\":2}]\"" format.I think this is in json format,I want to convert this into {id:1,id:2} format.
I tried to convert this into string format using JsonConvert.serailizeObject(),
but it is displaying in "\"\\\"[{\\\\\\\"id\\\\\\\":1}]\\\"\""format.
can u tell me how can i convert into integer format
How to convert an object from json format to integer format
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Nattudurai EswaramurthyRank #5,536 · 296 reputationPosted Aug 16, 2012, 1:57 AM EDT
Use the JSON reader object to read the item, then convert it to specific type(integer) whihc you want.
JsonReader reader = new JsonReader(new JsonReaderConfig() { { setTotalProperty("results"); // The property which contains the total dataset size (optional) setRoot("rows"); // The property which contains an Array of row objects setId("id"); // The property within each row object that provides an ID for the record (optional) }}
Please mark this answer as accepted answer if it resolves your problem.