JSONArray 转 list
时间: 2023-10-11 16:06:02 浏览: 100
要将JSONArray转换为List,可以使用以下代码示例:
JSONArray jsonArray = new JSONArray();
// 假设jsonArray是你要转换的JSONArray对象
List<Object> list = jsonArray.toJavaList(Object.class);
// 使用toJavaList方法将JSONArray转换为List
这样,你就可以将JSONArray成功转换为List对象。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [jsonArray转List](https://blog.csdn.net/m0_46069384/article/details/122937468)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [JsonObject 转换对象List](https://blog.csdn.net/m0_55913607/article/details/126645886)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文