Jackson multiple objects and huge json files

后端 未结 3 1633
长发绾君心
长发绾君心 2021-02-08 19:08

I get the feeling that the answer might be a duplicate of this: Jackson - Json to POJO With Multiple Entries but I think that potentially the question is different enough. Also

3条回答
  •  渐次进展
    2021-02-08 19:58

    Assuming you have an array wrapping your objects, create a JsonParser and then call readValuesAs with the appropriate type. It gives you back an Iterator with all your objects that reads through the file as you consume the objects.

提交回复
热议问题