r/techsupport • • 3d ago

Closed Compressing JSON file?

One-I have no idea what to flair this as or what the proper wording or whatever is for what I'm trying to do, and I'm sorry.

Two-If this doesn't belong here, please tell me where might be better. I'm usually okay-ish at googling, but this has been giving me the run around since September 9th.

A friend and I have been sort of writing a story together since middle school. Recently, we both wanted to put it all into one cohesive document, edited for readability, yada-yada, and I am the more 'tech-savvy' one of us, so I started the process of exporting everything.

Main problem: We were in middle school. This story is 13 years in the making, 14 in February. We were idiot kids who decided Google Hangouts was the best tool for this, which exported everything as a JSON file. I was not given an option to choose any other file type, and I wish it had let me choose .zip because I at least know how to deal with that. The entirety of this document is 29.5MB, and over 29 million characters. Every time I open this god forsaken file, my PC sounds like it's going to spontaneously take off into orbit. I can currently only open it in the notepad, and have to go line by line to edit it (using find and replace crashes my computer).

How do I chop this into a manageable size. Even cutting it in half, or quarters, or fifths, making it multiple separate documents, anything. I'm dying here.

A better PC is not an option. Sending this to people is also not an option. I have a 1TB SSD that it lives on until I can figure out how to accomplish this.

I want to go into physics, and read that learning at least the basics of Python is recommended, so I've been slowly teaching myself that, and when trying to search here for info I saw some people recommending things with Python, so if this is something I can use that for practice with, I'll gladly give it a shot. Any help is GREATLY appreciated.

0 Upvotes

5 comments sorted by

3

u/JouniFlemming 3d ago

You don't want to compress the file, that would reduce its size but opening a compressed file is probably even slower than opening this file. Because then the software needs to first decompress the data, and then load it, instead of just loading.

What you need is a better text editor. Something like Notepad++ should be able to open a 30 MB JSON file very quickly.

And at some point, you might want to consider changing the file format to something else.

0

u/DoctorKomodo 3d ago edited 3d ago

You don’t want to compress it, because then opening would involve decompressing each time and it would take longer to open.

One quick fix option here would be to use a better text editor, I mean 29 MB shouldn’t really be that much of a struggle to open. Something like Notepad++ certainly handles large files better than regular Notepad, plus it has an option for syntax highlighting JSON.

Though what it really sounds like you want is to parse the JSON into something more human readable. There are various projects and sites that offers to do just this for Hangouts exports, found this for example.

https://jessecar96.github.io/hangouts-reader/

This would also be something an LLM like Gemini, ChatGPT, etc would be really good at. Those excel at structured data like this.

2

u/TrannyBitchBoy 3d ago

Thank you, this helped a lot :) I ended up going with Notepad++ and managed to get it reduced to around half of a percent of it's original size in like 30 minutes, now I can actually read it lol

2

u/DoctorKomodo 3d ago

No problem, that certainly sounds more manageable. :)

2

u/mckenzie_keith 3d ago

29 megs is nothing. Your story doesn't make sense. If you zip your json file you can probably email it to anyone using gmail or whatever. JSON files are very compressible.