How to remove backslash from URL?

I am using the Twitter API and the response I get is in JSON format. When I parse JSON using C #, so the value profile_image_urldoes not contain the correct URL. This URL is absolutely accurate in the answer, but after parsing the answer, I get the following URL. How to remove backslash?

http://a1.twimg.com/profile_images/700049686/14_normal.jpg

+3
source share
1 answer

You can remove the backslash using the Replace function:

url = url.Replace("\\", "")

But maybe you should spend some time on how these backslashes got there first. It looks like you are not parsing JSON correctly. Which parser are you using?

+2
source

Source: https://habr.com/ru/post/1734164/


All Articles