I have a 20MB .json.gz file, when uncompressed it becomes 280MB, I'd like to obtain the corresponding Javascript object in my web page so that I can do some stuffs. Unfortunately it is now clear that standard methods are buggy when reaching the 256MB limit.
There are two versions of the file, v3 is 20MB and v2 is 16MB (uncompressed 280MB and 230MB)
For the v2 file a solution worked: using jQuery
$.getJSON( "./data_package2.json.gz" , function( res ){ /* res contains the parsed object */ });
With the v3 file it now fails somewhere during parsing (hard to debug jQuery's code so I can't say more, also the error message depends on jQuery's version).
Concretely in this web page the v2 button works fine but not the v3.
I tried loading the compressed json files in Python and both of them work
pip install compress_json
python
import compress_json
D1 = compress_json.load("data_package3.json.gz")
D1["case_data"][1]
// it works fine ... even if it is using 800MB of RAM..
I'd like some help to understand what fails in jQuery's code and eventually to find a javascript zlib/JSON-parser code that will work on the v3 file.