Android应用JSON数据

时间:2017-07-05 02:27:30

标签: java android json list parsing

如何在Android中将此Json数据显示为简单列表?我希望将它显示在一个简单的列表中,将来我可以使用这个Json数据创建一个复杂的列表,但首先我想先在一个简单的列表适配器中显示它。

{
"events": [
{
"event_id": 50,
"name": "Eagle Run",
"description": "56th anniversary of ateneo cebu ",
"organizer": "Haribon Foundation",
"gunStart_date": "2017-12-31",
"status": "Active",
"userfile": "banners/2gTZzZ_er.jpg",
"permit": "permit/images.png",
"venue": "Ateneo",
    "cat": [
   {
    "eventkm_id": 115,
   "event": "50",
   "km": "5",
   "registration_fee": 50,
   "singlet": "singlet/singlet.jpg",
      "numOfPoints": "20.00"
    },
    {
   "eventkm_id": 116,
   "event": "50",
   "km": "10",
   "registration_fee": 100,
   "singlet": "singlet/singlet.jpg",
   "numOfPoints": "20.00"
   }
   ]
  },
  {
    "event_id": 52,
    "name": "USJ-R Run for the fun",
    "description": "This run is nothing but for fun.",
    "organizer": "Marz",
    "gunStart_date": "2017-07-03",
    "status": "Active",
    "userfile": "banners/6FeoO9_beautiful-festa-junina-design-with-
    garlands_1017-8985.jpg",
    "permit": "permit/ZgukLx_permit.brooklyn.gif",
   "venue": "usj-r basak campus",
    "cat": [
      {
    "eventkm_id": 118,
    "event": "52",
    "km": "10",
   "registration_fee": 100,
    "singlet": "singlet/juyV25_singlet.jpg",
    "numOfPoints": "100.00"
   }
  ]
   },
  {
 "event_id": 53,
 "name": "Pizza Hut Run",
  "description": "Pizza Run",
  "organizer": "Haribon",
  "gunStart_date": "2017-07-03",
  "status": "Active",
   "userfile": "banners/jgKWDO_holi-festival-brochure-with-colorful-
  stains-and-hands_23-2147598493.jpg",
   "permit": "permit/t3YT0D_images.png",
   "venue": "SM",
 "cat": [
    {
  "eventkm_id": 119,
 "event": "53",
   "km": "3",
 "registration_fee": 100,
   "singlet": "singlet/PVTe4Y_singlet.jpg",
   "numOfPoints": "3.00"
 }
 ]
}
 ]
 }

这是原始的JSON链接:http://desolate-mountain-65344.herokuapp.com/api/viewEvents

0 个答案:

没有答案