How to convert arbitrary JSON into a usable structure in Java

后端 未结 4 735
囚心锁ツ
囚心锁ツ 2020-12-16 19:18

I\'m trying to use gson to convert this returned JSON into some kind of data structure such that I can extract useful data.

For Example:

http://search.twitte

4条回答
  •  鱼传尺愫
    2020-12-16 20:14

    There are some tools that do gson to schema mapping. You give some sample JSON responses, and the java classes to access them are created for you.

    http://www.jsonschema2pojo.org/

提交回复
热议问题