How to parse JSON file?

后端 未结 3 876
礼貌的吻别
礼貌的吻别 2020-12-09 05:49

Simple situation -

  1. read a json file
  2. discover all key-value pairs
  3. compare key-value pairs

I tried gson, package from json.org,

3条回答
  •  不思量自难忘°
    2020-12-09 06:49

    XStream is good for JSON: http://x-stream.github.io/json-tutorial.html

    Due to XStream's flexible architecture, handling of JSON mappings is as easy as handling of XML documents. All you have to do is to initialize XStream object with an appropriate driver and you are ready to serialize your objects to (and from) JSON.

提交回复
热议问题