Parsing JSON response in Android

前端 未结 2 687
执笔经年
执笔经年 2021-01-03 02:57

I am writing a httpget request for android that queries the foursquare api for nearby event. The JSON responce I receive back is

{\"groups\": [
{
  \"type\"         


        
2条回答
  •  渐次进展
    2021-01-03 03:36

    I believe placing this code inside your for-loop should do the trick:

    JSONObject venueObject = venues.getJSONObject(i);
    double geoLat = venueObject.getDouble("geolat");
    double geoLong = venueObject.getDouble("geolong");
    

提交回复
热议问题