I'm starting in Android and I want to get data from the server and show data in the data view. I get the data correctly from the server and show the result in toast, but my data is:
[{"countryname": "China", "calculation" : "200"}]
How can I parse that result in this block?
For example: countryname = China
@Override protected void OnPostExecute (string result) {//Toast.makeText (getBaseContext (), "Data sent! ", Toast.LNGTH_LONG). Show (); //Log.d (I have my backup backup: "result.toString ()); try {JSONObject jsonObj = new JSONObject (result);} hold (JasonXExtension) {e.printStackTrace ();}}
Please do not show me the link to the tutorial or any other site, please write your code. Thanks for all.
No comments:
Post a Comment