Convert a massive (20mb+) single-line JSON file into a multi-line file

Viewed 27

I have a huge one line json file that I want to convert into a multi-line file so I can read it. I have tried to use online tools but unsurprisingly they just crash. I have looked at python scrips but they haven't worked. I do have a Linux machine but it only has very minimal ram (2GB) and so I doubt if they load the file into ram that it would work.

1 Answers

In which "multi-line-file" do you want to convert it to? If you want it as a JSON but parsed you can use

JSON.parse(<stringified json>)

if you are in vscode you can also try different extensions for pretty format if you mean that format what i think of.

Related