how to parse a huge JSON file without loading it in memory
问题 I have a large JSON file (2.5MB) containing about 80000 lines. It looks like this: { "a": 123, "b": 0.26, "c": [HUGE irrelevant object], "d": 32 } I only want the integer values stored for keys a , b and d and ignore the rest of the JSON (i.e. ignore whatever is there in the c value). I cannot modify the original JSON as it is created by a 3rd party service, which I download from its server. How do I do this without loading the entire file in memory? I tried using gson library and created the