i'm beginner in android and i want to get data from server and show the data into list view. i get correctly data from server and show result into Toast,but my data is:
[
{"countryname":"China", "Count":"200"}
]
how can i parse that result in the this block?
for example:countryname=China
@Override
protected void onPostExecute(String result) {
//Toast.makeText(getBaseContext(), "Data Sent!", Toast.LENGTH_LONG).show();
//Log.d("My Return BackUp is:",result.toString());
try {
JSONObject jsonObj = new JSONObject(result);
} catch (JSONException e) {
e.printStackTrace();
}
}
please do not show me a link of tutorial or another site,.please write your code. thanks for all.