c# - How to read form-url encoded response -
i making http post request rest service
content: application/x-www-form-urlencoded accept: application/x-www-form-urlencoded
i response in below format
"{\r\n\t\"status\":\"success\"\r\n}"
is there way load string , read status
check out json.net library: http://james.newtonking.com/json (nuget: newtonsoft.json)
you digest response dynamic class:
var testdata = "{\r\n\t\"status\":\"success\"\r\n}"; dynamic testobject = jsonconvert.deserializeobject(testdata); console.writeline(testobject.status); //success console.readkey();
Comments
Post a Comment