The json file is too large to be inserted into memory in any form.
You should use a JSON reader that takes a file name or stream as input. From your question, which you use JSON Reader is unclear. What library?
If your JSON reader builds an entire JSON tree, you will still have a shortage of memory. When you read the JSON file, either cherry picks the data you are looking for, or writes the data structures to another format on disk, which can be easily queried, for example, the sqlite database.
source share