如何在android中解析这个JSON数组

前端之家收集整理的这篇文章主要介绍了如何在android中解析这个JSON数组前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我想要每个TAG的名称,电子邮件和图像.我必须在List元素中显示.
{
   "response":[
      {
         "name":"Brajendra Mishra","email":"test1@SEOlogistics.com","address":"Information Service\r\nParliament of Canada\r\nOttawa,Ontario K1A 0A9","aboutus":"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries,but also the leap into electronic typesetting,remaining essentially unchanged. ","image":"http:\/\/74.52.209.213\/lab\/event\/img\/attachments\/photos\/small\/4f2a5a71-acc0-4319-b1ca-14774a34d1d5.jpg"
      },{
         "name":"Toney Grey","email":"test2@SEOlogistics.com","image":"http:\/\/74.52.209.213\/lab\/event\/img\/attachments\/photos\/small\/4f1d4283-5204-4f16-90d6-69924a34d1d5.jpg"
      }
   ],"count":2
}

我尝试了很多但却无法做到.

只是让我知道循环,如何达到每个名称,电子邮件,图像等的值,如何保持.

解决方法

我为你的问题生成了一个解决方案.
JSONArray jObject = new JSONArray(jsoninputstring);
        for (int i = 0; i < jObject.length(); i++,start++) {
             JSONObject menuObject = jObject.getJSONObject(i);

             String name= menuObject.getString("name");
             String email= menuObject.getString("email");
             String image= menuObject.getString("image");
        }
原文链接:https://www.f2er.com/android/315786.html

猜你在找的Android相关文章