I'm trying to use Json with android I have a link that returns a Json string
InputStream is = new URL(url).openStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
String jsonText = readAll(rd);
JSONObject json = new JSONObject(jsonText);
but, on making a new JSONObject(jsonText); it crushes.
Here is my URL : http://igorsdomain.byethost3.com/getUser.php?username=SailorBoogy&password=qwerty&event=2222
This is the object returned : {"ID":"23","Username":"SailorBoogy","Password":"qwerty","eventID":"6"}
I tried also to JSONObject(jsonText.replaceAll("\"" , "\\\\\""));
but it didn't work.
What's the problem ? am I using it wrong ?
Json Libraries :
org.json.JSONException; org.json.JSONObject; org.json.JSONStringer;