JSON.simple
JSON.simple是一个简单的Java类库用于生成和解析JSON文本。不依赖于其它类库,高性能,已经在以下多个开源项目中使用。
JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple to encode or decode JSON text.
Features
Full compliance with JSON specification (RFC4627) and reliable (see compliance testing)
Provides multiple functionalities such as encode, decode/parse and escape JSON text while keeping the library lightweight
Flexible, simple and easy to use by reusing Map and List interfaces
Supports streaming output of JSON text
Stoppable SAX-like interface for streaming input of JSON text (learn more)
Heap based parser
High performance (see performance testing)
No dependency on external libraries
Both of the source code and the binary are JDK1.2 compatible
JSON与Java实体映射关系如下:
JSON Java
string java.lang.String
number java.lang.Number
true|false java.lang.Boolean
null null
array java.util.List
object java.util.Map