List> to org.json.JSONObject?

后端 未结 8 2073
借酒劲吻你
借酒劲吻你 2020-12-14 20:12
List> list = new ArrayList>();
Map map = new HashMap();

         


        
8条回答
  •  难免孤独
    2020-12-14 20:43

    You need to end up with a JSONArray (corresponding to the List) of JSONObjects (the Map).

    Try declaring the json variable as a JSONArray instead of a JSONObject (I believe the JSONArray constructor will do the right thing).

提交回复
热议问题