federomero / pretty-json

Atom plugin. Format JSON documents.
MIT License
94 stars 23 forks source link

Crashes when attempting to prettify 11.8 MB json file #59

Closed danzek closed 7 years ago

danzek commented 8 years ago

Several of the lines are very long in the file, but it's validly formatted according to jsonlint (unfortunately I cannot share the file because it contains proprietary information).

Atom Version: v1.10.2

Using package: pretty-json v1.6.0

Other package installed: jsonlint v1.1.4 (only other community package installed)

syky27 commented 8 years ago

Same here, it is completely unusable for large JSONs.

lexicalunit commented 8 years ago

@syky27 Do you have an example data file for me to begin testing with? Do you mean large in the sense of line-length or number of lines or sheer file size?

lexicalunit commented 8 years ago

@danzek Note that Atom in general has some issues even just opening large files. The editor gained the ability to open larger than 2MB files in June of last year. It's a known issue and I'm sure the devs are working on improving it over time.

syky27 commented 8 years ago

Hi @lexicalunit I am able to open the file using atom and browse it, however when I try to resave the file to get it aligned Atom crashes...

https://www.dropbox.com/s/rm976lixugz5n17/ottica.json?dl=0

lexicalunit commented 8 years ago

Confirmed. Trying to prettify that file crashes my Atom editor as well. OS X, Atom 1.11.2.

syky27 commented 8 years ago

FYI I am running macOS 10.12.1 with Atom 1.11.2, so believe we are running the same versions unless you do not have newest macOS.

Thank you.

danzek commented 8 years ago

@lexicalunit I can open the file fine. It only crashes when I try to prettify it. I repeated this with a 386 MB JSON file. Unfortunately I can't share the data.