如何阅读form-url编码的响应 [英] How to read form-url encoded response
本文介绍了如何阅读form-url编码的响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在向Rest服务发出HTTP Post请求
内容:application / x-www-form-urlencoded
接受:申请/ x-www-form-urlencoded
我收到以下格式的回复
{\\\\\\\status \:\成功\\\\\ \\ n}
有没有什么好方法可以加载这个字符串并读取状态
I am making HTTP Post request to Rest service
Content: application/x-www-form-urlencoded
Accept: application/x-www-form-urlencoded
I get response in below format
"{\r\n\t\"status\":\"Success\"\r\n}"
Is there any good way to load this string and read status
推荐答案
sam ,
您可以直接使用JNK的Json.Net或MS的JavaScriptSerializer和DataContractJsonSerializer。
但是Json.Net很容易使用,所以建议你去使用它!
sam,
You can use Json.Net from JNK or either of JavaScriptSerializer and DataContractJsonSerializer from MS directly.
But Json.Net is pretty easy to use so would recommend to go with that!
这篇关于如何阅读form-url编码的响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文