Android: Parsing large JSON file

后端 未结 2 1418
迷失自我
迷失自我 2020-12-12 06:28

I\'m creating an android application which should parse a Json from a file or url to a jsonarray and jsonobjects. The problem is that my json is 3.3 mb and when i use a simp

2条回答
  •  -上瘾入骨i
    2020-12-12 07:12

    The hybrid streaming approach with Jackson is a good option. That way, you can advance a pointer through your raw JSON input (validating it as you go) and, when you detect an input chunk that needs to be processed, you can read it into a tree-hierarchy so that you can pull out any data you want from it.

提交回复
热议问题