I got a response from a webservice as shown below
{
"header": {
"sourceId": "1002",
"mndAction": "CREATE",
"msgId": "msg10022",
"errMsg": null,
"txnStatusFlg": "1",
"successMsg": "SUCCESS"
},
"response": {"responseString": "Required Data"}
}
I want to get the value of responseString from the above json data.
For the response
{"Status":"success","DocRepoId":225,"Details":"success",
"ErrorCode":"","responseString": "Required Data"}
I used the code
var deserializer = new JavaScriptSerializer();
var someObject = deserializer.Deserialize<Dictionary<string, string>>
(response);
string responseString= someObject["responseString"].ToString();
to get the value of responseString but in this case its showing error. I'm looking for a solution without using json.net or anything similar. My project is on .net version 3.5.