JSON的序列化和反序列化

来源:互联网 发布:rar密码破解软件 编辑:程序博客网 时间:2024/05/07 02:45

JsonTools是一个不错的JSON序列化和反序列化功能包,在这里可以下载到它:http://jsontools.berlios.de/。

 

    它有以下功能:

  1. Parser: Parse JSON text files and convert these to a Java model.
  2. Renderer: Render a Java representation into text.
  3. Serializer: Serialize plain POJO clusters to aJSON representation. The goal is to provide a serializing mechanismwhich can cope with all kinds of Java datastructures (recursion,references, primitive types, ...) .
  4. Mapper: Map POJO to JSON, this time the JSON textshould be as clean as possible. This tool is the best choice when datahas to be communicated between Java and other programming languages whocan parse JSON.
  5. Validator: Validate the contents of a JSON file using a JSON schema.

    如何使用呢?请参考下面我写的示例代码:

转自:http://lxy19791111.javaeye.com/blog/222869

原创粉丝点击