JSON

Welcome to Json-lib

JSON-lib is a java library for transforming beans, maps, collections, java arrays and XML to JSON and back again to beans and DynaBeans.
It is based on the work by Douglas Crockford in http://www.json.org/java.

The following tables sumarizes the types conversion between java and javascript:

JSON Java
string<=>java.lang.String, java.lang.Character, char
number<=>java.lang.Number, byte, short, int, long, float, double
true|false<=>java.lang.Boolean, boolean
null<=>null
function<=>net.sf.json.JSONFunction
array<=>net.sf.json.JSONArray (object, string, number, boolean, function)
object<=>net.sf.json.JSONObject

The function type from javascript is not part of the JSON format "officially" (please refer to http://www.json.org) but it is supported as well.

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
Other dependencies are needed if working with XML andGroovy. Please review the Dependencies report to know more about those extra dependencies.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值