For example: mystr="\"http:\\/\\/somedomain.com\"";
i want to convert this string to "http://somedomain.com";
HttpUtility.HtmlDecode and HttpUtility.UrlDecode dont work
how can convert this?
For example: mystr="\"http:\\/\\/somedomain.com\"";
i want to convert this string to "http://somedomain.com";
HttpUtility.HtmlDecode and HttpUtility.UrlDecode dont work
how can convert this?
This is because you need to escape the "\" and the quotes (") character in C#. There is no Encoding / Decoding to do. If you want to get rid of the confusing backslashes add a @ before your string
myStr = @"http://www.google.com"
Nevertheless, your string looks weird so you will need to get the text inside the quotes and then remove those weirdly placed "\" in the http:// part.
result=jsonValue.Parse(text).asDynamic(). After result.domain` contains literal string. I need to convert result.domainresult.domain error: cannot debug dynamic value. Next time string mystr=result.domain.ToString(); Then watch mystr in debugger, looks like "\"http:\\/\\/somedomain.com\""