简体   繁体   中英

Best way to approach consuming large json payload in Spring?

So I am using Reddit's rest api to be able to take all the articles from a subreddit. This gives me a large json, which leaves me confused on how I should approach consuming this json via rest template. My first thought to create an Object class which maps perfectly with the json and then use Gson or jackson. This is very daunting as there are so many fields in the json that I was wondering if there was a better way to do this.

Thanks for any help

You can specify that unknown fields be ignored in Jackson and only define those fields that you care about in your object model.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM