JSON-IO

程序名称:JSON-IO

授权协议: Apache

操作系统: 跨平台

开发语言: Java

JSON-IO 介绍

JAVA平台下的一款,序列化反序列化工具,重点在于

1.可以直接把JSON反序列化为对象.

2.可反序列化深层复杂的对象.

3.可序列化循环引用等复杂对象.

4.可序列化静态类和内部类.

json-io can be used directly on JSON Strings or with Java’s Streams.

Example 1: String to Java object

    Object obj = JsonReader.jsonToJava("[\"Hello, World\"]");

This will convert the JSON String to a Java Object graph. In this case, it
would consist of an Object[] of one String element.

Example 2: Java object to JSON String

    Employee emp;     // Emp fetched from database     String json = JsonWriter.objectToJson(emp);

This example will convert the Employee instance to a JSON String. If the
JsonReader were used on this String, it would reconstitute a JavaEmployee
instance.

Example 3: InputStream to Java object

    JsonReader jr = new JsonReader(inputStream);     Employee emp = (Employee) jr.readobject();

In this example, an InputStream (Could be from a File, the Network, etc.) is
supplying an unkNown amount of JSON. The JsonReader is used to wrap the stream
to parse it, and return the Java object graph it represents.

Example 4: Java Object to OutputStream

    Employee emp;     // emp obtained from database     JsonWriter jw = new JsonWriter(outputStream);     jw.write(emp);     jw.close();

JSON-IO 官网

https://code.google.com/p/json-io/

相关编程语言

MuPlayer 是一款跨平台、轻量级的音频播放解决方案,...
OS FLV 是一个 开源和可嵌入网页的flv播放器。 这个...
DewPlayer音乐播放器,样式很简单,而且很实用.播放器...
JW FLV MEDIA PLAYER是一个开源的在网页上使用的Fla...
Speakker 是一个基于 Web 浏览器的音乐播放器,只提...
Player Framework 是一个开源的支持 HTML5 的视频播...