What is JSON ?
2008-04-21 14:00
204 查看
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 |
functiontype 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.3
jakarta commons-beanutils 1.7.0
jakarta commons-collections 3.2
jakarta commons-logging 1.1
ezmorph 1.0.4
Other dependencies are needed if working with XML, Groovy and JRuby. Please review the Dependencies report to know more about those extra dependencies.
What is JSON ?
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others.These properties make JSON an ideal data-interchange language.
相关文章推荐
- What is JSON:在ASP.NET中使用JSON
- What is JSON:初识JSON
- What is JSON:The application/json Media Type for JSON
- What is JSON:初识JSON
- 【转】What is JSON:初识JSON
- What is JSON:初识JSON
- What is JSON ?
- What is JSON:初识JSON
- What is JSON: the 3 minute JSON Tutorial
- What is JSON and Its usage
- What is JSON:初识JSON
- What is JSON?
- What is JSON:初识JSON
- What is JSON:初识JSON
- What is JSON:在ASP.NET中使用JSON
- JSON
- org.apache.struts2.json.JSONWriter can not access a member of class
- 使用jQueryajax文件上传ajaxfileupload组建碰到的问题:返回json带有pre标记的解决方案
- JSON 之JAVA 解析
- mongodb mongoexprt 导出数据 json csv格式