我的JDK是1.6,json-lib换了好几个版本还是不行,jsonArray与list之间的转换始终进行不了,之前也用到jsonArray与String之间的转换报错,不得不改用org.json.jar那个包;今天再次遇到这个问题,我决心找出原因:
Json-lib comes in two flavors, depending on the jdk compatibility. json-lib-x.x-jdk13 is compatible with JDK 1.3.1 and upwards. json-lib-x.x-jdk15 is compatible with JDK 1.5, includes support for Enums in JSONArray and JSONObject. Please reffer to the appropriate javadoc links available in the project menu.
Json-lib requires (at least) the following dependencies in your classpath:
- jakarta commons-lang 2.5
- jakarta commons-beanutils 1.8.0
- jakarta commons-collections 3.2.1
- jakarta commons-logging 1.1.1
- ezmorph 1.0.6