I am trying to parse JSON from web service. But i get "String could not be converted to Json Object" error.
My json: {"encoding":"UTF-8","yorumlar":[["dogukan","deneme yorumu"],["Burak","yorum"]]}
I get this string like below;
HttpClient client = new DefaultHttpClient();
HttpUriRequest request = new HttpGet(url);
HttpResponse response = null;
try
{
response = client.execute(request);
String jsonString = StreamUtils.convertToString(response.getEntity().getContent());
JSONObject json = new JSONObject(jsonString);
.
.
.
When i got this string from web service like above, i get this error but when i do that:
JsonObject object = new JsonObject("{\"encoding\":\"UTF-8\",\"yorumlar\":[[\"dogukan\",\"deneme yorumu\"],[\"Burak\",\"yorum\"]]}")
i don't get this error. So, the strings are the same and json format is ok. What is the problem?