https://github.com/imrobin/net.sf.json
net.sf.json 项目使用的json库
https://github.com/imrobin/net.sf.json
json net-sf-json
Last synced: 5 months ago
JSON representation
net.sf.json 项目使用的json库
- Host: GitHub
- URL: https://github.com/imrobin/net.sf.json
- Owner: imrobin
- Created: 2019-12-20T05:11:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-05-28T18:01:14.000Z (about 1 year ago)
- Last Synced: 2025-07-18T15:23:18.299Z (12 months ago)
- Topics: json, net-sf-json
- Language: Java
- Size: 122 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction
## Welcome to Json-lib
JSON-lib is a java library for transforming beans, maps, collections, arrays and XML to JSON
and back again to beans and DynaBeans. It is based on the work by Douglas Crockford in
.
The following table summarizes the types conversion between Java and JavaScript:
| JSON | | Java |
| ------ | ------ | ------ |
| string | ⇔ | java.lang.String, java.lang.Character, char |
| number | ⇔ | java.lang.Number, java.math.BigDecimal, 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 )
but it is supported as well.
Json-lib requires (at least) the following dependencies in your classpath:
* Apache commons-lang3 3.9
* Apache commons-beanutils 1.9.3
* Apache commons-collections4 4.4
* slf4j 1.7.28
* ezmorph 1.0.6
Other dependencies are needed if working with XML and Groovy.
* xom 1.3.2
* groovy 2.5.8
## 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.
NOTE: Documentation for older releases can be found at link: [json-lib.sourceforge.net](http://json-lib.sourceforge.net)