0

I have following problem. I have android app with some data and I want to post json data to web api. Api notice when you load url with json like this.

http://example.eu/xx/yyyy/{"data1":"TEXT","data2":"TEXT","data3:"TEXT","data4":"TEXT"}

but when I do it like this ....

URL url = new URL("http://example.eu/xx/yyyy/"+json);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.connect();

It work but in api i see this

"{\"id\":\"14D20E65-5701-4519-AD87-1FBBD80706CF\",\"stav\": \"SENT\"}"

There are quotation marks with backslash. And I don't know how to remove them. (I think the problem is when i load string url to URL class)

OndrejK
  • 1
  • 1

0 Answers0