Personally I use this tool to convert my JSON to CSV. Then, CSV can be used as normal with LibreOffice Calc, Google Sheets, or Microsoft Excel.
Answer from superuser on askubuntu.comPersonally I use this tool to convert my JSON to CSV. Then, CSV can be used as normal with LibreOffice Calc, Google Sheets, or Microsoft Excel.
The mentioned Visual Studio Code or similar multi-functional editors or IDEs may not handle or crash even while processing JSON files of sizes bigger enough, like more than 500 MiB.
Sublime Text will handle quite big files in JSON at least for viewing.
But still, both are not a solution to the question, I believe. Those are full-blown multi-functional editors and sure not specifically oriented on data editing as JSON, YAML, CSV, or alike, predominantly, but just feature an additional support for relatively small files.
Therefore, have you considered standalone software, like the following?
Graphical User Interface (GUI)
Janice
A desktop app for viewing large JSON files...
What is the largest JSON file that I can load?
The largest JSON file you can load on your computer depends mainly on how much RAM you have and on the particular JSON file. The main driver for memory consumption is the number of elements in a JSON document.
For comparison we did a load test on one of our developer notebooks. It has 8 GB RAM and runs Ubuntu 22.04 LTS. We were able to load a JSON files successfully with up to 45 million elements. The size of our test file was about 2.5 GB.
Source
Text User Interface (TUI)
FX
Fx is a CLI for JSON: it shows JSON interactively in your terminal, and lets you transform JSON with JavaScript. Fx is written in Go and uses goja as its embedded JavaScript engine.
Source
Python JSON's module can do this too (python -m json.tool), e.g.:
cat myjsonfile.json | python -m json.tool > pretty.json
If you just want to visualize (and search) a json file, Firefox does a pretty good job. I don't have a 40MB file on hand, but it easily handled a 9MB one.
Just drag the JSON file to Firefox, or run:
firefox your_file.json
jq is a json processor (like sed for json) which can also be used to pretty-print json documents.
cat yourfile.json | jq
The "earliest" and "most basic" tool I can think of that may be used to display the contents of a JSON file is cat:
$ cat file.json
This will not do pretty-printing and it will show the "raw JSON", i.e. the file as it is.
The cat utility was available in at least the 2nd release of Unix from Bell Labs in around 1972.
The JSON format was first introduced in the early 2000s.