I have the error message:
error in executing get org.json.JSONException: Value org.apache.http.message.BasicHttpResponse@ed9ee8a of type java.lang.String cannot be converted to JSONObject
And the following code:
response = httpclient.execute(httpget);
JSONObject locationObj = new JSONObject(String.valueOf(response));
JSONObject locationInfo = locationObj.getJSONObject("item");
lat = locationInfo.getInt("lat");
lon = locationInfo.getInt("lon");
I don't want to return the string, I want to get the items from the JSON string and use them for a google map.
String json = "{\"info\": {" +"\"lat\": " + locationGet.getLat() + ", " + "\"lon\": " + locationGet.getLon() + "} }";