问题描述
在C#中的处理如JavaScript逃生/ UNESCAPE的任何功能?
Are the any functions in C# that handle escape/unescape like JavaScript?
我有一个JSON字符串是这样的:
I have a JSON string like this:
<$c$c>{\"Feeds\":[{\"Url\":\"www.test.com\",\"FeedType\":\"Twitter\"},{\"Url\":\"www.test2.com\",\"FeedType\":\"Youtube\"}]}$c$c>
看起来像这样在越狱()
<$c$c>%7B%22Feeds%22%3A%5B%7B%22Url%22%3A%22www.test.com%22%2C%22FeedType%22%3A%22Twitter%22%7D%2C%7B%22Url%22%3A%22www.test2.com%22%2C%22FeedType%22%3A%22Youtube%22%7D%5D%7D$c$c>
在我的C#code,我想反转义这个字符串,使它看起来,因为它没有完全一样的前越狱()
In my C# code I would like to unescape this string so that it looks exactly the same as it did before the escape()
这可能吗?
推荐答案
应该做的伎俩。
HttpUtility.UrlDecode
should do the trick.
这篇关于使用C#UNESCAPE JavaScript的越狱()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!