使用C#UNESCAPE JavaScript的越狱() [英] Unescape JavaScript's escape() using C#

查看:320
本文介绍了使用C#UNESCAPE JavaScript的越狱()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在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>%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#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 .UrlDe code 应该做的伎俩。

HttpUtility.UrlDecode should do the trick.

这篇关于使用C#UNESCAPE JavaScript的越狱()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆