0

I am working with a web service for my next android application. This web service returns me some data, which is in an escape sequence and in JSON format. I am not able to process it using Java in Android.

The problem that I'm having with the data is for the following string example:

http:\\/\\/www.example.com\\/temp\\/.

Apparently Java can not let me have an escape sequence that contains \/ in it. It would not even let me put that in a double quote, so that I could use an unescape utility. Can you please help me with it?

Thanks in Advance!

TeaDrivenDev
  • 6,591
  • 33
  • 50
  • Try this.. > http://stackoverflow.com/questions/9575116/forward-slash-in-java-regex > > http://stackoverflow.com/questions/6111985/java-forward-slash-escape-character – Giridharan Apr 26 '14 at 11:22
  • I'm sorry. The string in the question was posted wrong. HTML removed that escape sequence. Please read my question now. – user3575790 Apr 26 '14 at 12:06

1 Answers1

0

The problem with this is that you are escaping a forward slash ( / ). JAVA does not need forward slash to be escaped.

instead of an url string like below

http:\/\/www.example.com\/temp\/

set the url string as below

http://www.example.com/temp/
Steve N
  • 83
  • 6