0

Here url = "https://youtu.be/02G43456CA" is a string that contains some video URL

JSONObject jsonObject = new JSONObject();
    
jsonObject.put("url", url);
 
Log.i(TAG, jsonObject.toString()); 

But when I Log this jsonObject then the URL contains backslash like following

https:\/\/youtu.be\/02G43456CA

We can remove the backslashes after that. But I want to prevent this insertion instead of removing it after insertion? How can I prevent this backslash insertion?

Bhaskar Jyoti Dutta
  • 1,558
  • 2
  • 12
  • 27

0 Answers0