Java List转 JSONObject
pom.xml
<dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>4.5.7</version> </dependency>
实现:
List<Object> list= new ArrayList<>();
JSONArray jsonArray = JSONUtil.parseArray(list);
JSONObject jsonObject = jsonArray.toJSONObject(jsonArray);
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/281252.html