http://jingyan.baidu.com/article/1612d5004686f0e20e1eeeba.html
准备包:
commons-beanutils-1.8.0.jar
commons-collections-3.1.jar
commons-lang.jar
commons-lang3-3.1.jar
json-lib-2.4-jdk15.jar
jsonplugin-0.32.jar
ezmorph-1.0.6.jar
其中lang包估计是版本 我这里要用两个才能用!
然后在选中工程-》右键-》build path -> config build path -> Java build path ->libraries-> add jar ->finsh
在代码中加入
List li = impl.getObjList();
JSONArray jsonArray = JSONArray.fromObject(li);
crtl+shift+o导入
import net.sf.json.JSONArray;
好
[{"activeStatus":1,"activeTime":120,"corpCode":"","corpId":1,"cpAllParentIds":",1,"}]
在向山靠近一点,才发现这座山,好象一位诗人遥望远方,