SoypeCeaplelm
New Member
i have this json : \[code\]{"id":1,"name":"john smith"}\[/code\]How i can parse it? i know i have to do this with this function:\[code\]public static String parseJSONResponse(String jsonResponse) { String name = ""; JSONObject json; try { json = new JSONObject(jsonResponse); JSONObject result = json.getJSONObject("**********"); name = result.getString("**********"); } catch (JSONException e) { e.printStackTrace(); } return name;}\[/code\]but i dont know what can i put in the areas incated with "****". please help mei only want to fetch \[code\]id\[/code\] and \[code\]name\[/code\] values.