java操作json全jar包

时间:2020-09-27 09:53:57
【文件属性】:
文件名称:java操作json全jar包
文件大小:1.04MB
文件格式:RAR
更新时间:2020-09-27 09:53:57
java,json 使用JSONObject, JSONArray的全套完整jar包,绝对好用。另外附上例子一枚 package com.jjzy.test; import java.util.Iterator; import net.sf.json.JSONArray; import net.sf.json.JSONObject; public class TestJson { public static void main(String[] args) { String gg = "{\"name\":[\"啦啦\",\"哈哈\"]}"; JSONObject jsonObject = JSONObject.fromObject(gg); JSONArray jsonArr = jsonObject.getJSONArray("name"); @SuppressWarnings("unchecked") Iterator it = jsonArr.iterator(); while(it.hasNext()){ String ff = (String)it.next(); System.out.println("获取的是:"+ff); } } }
【文件预览】:
commons-beanutils.jar
commons-collections.jar
commons-logging.jar
json-lib-2.3-jdk15.jar
commons-lang-2.4.jar
ezmorph-1.0.5.jar

网友评论