News for hackers. Stuff that matters.
Re:Ask HN: How do you view large JSON files? by mtmail on Saturday July 09, 2016 @07:04PM (#12063735)
There's addons/extension for Chrome and Firefox. Both also called JSON Viewer (different author). For really large files I use a command-line tool plus grep and awk though https://stedolan.github.io/jq/
Re:Ask HN: How do you view large JSON files? by chuchuva on Saturday July 09, 2016 @07:26PM (#12063812)
jq looks promising but I still need to view the JSON file first. I want to be able to somehow get the general understanding of the structure very quickly and interactively. The tree control works very well for that. JSON Viewer is almost perfect but it doesn't work with local files.
Re:Ask HN: How do you view large JSON files? by slapresta on Saturday July 09, 2016 @09:11PM (#12064110)
I usually use jq to understand the structure of the file. `keys` will get you all the key names in an object; `with_entries(.value |= type)` will replace each element on an object with its type. You can quickly delve into a JSON and gain some understanding of it with jq.
Re:Ask HN: How do you view large JSON files? by dwaltrip on Saturday July 09, 2016 @08:47PM (#12064054)
JSON Formatter for Chrome works with local files (you have to check the box in the settings to enable it).

It's super handy. Drag and drop json files into a new tab.

Link: https://chrome.google.com/webstore/detail/json-formatter/bcj...

Re:Ask HN: How do you view large JSON files? by bsg75 on Saturday July 09, 2016 @08:08PM (#12063941)
jq . file.json | less
Re:Ask HN: How do you view large JSON files? by bsg75 on Saturday July 09, 2016 @08:09PM (#12063944)
jq . file.json | less

or

curl ... | jq . | less

Re:Ask HN: How do you view large JSON files? by rickyc091 on Saturday July 09, 2016 @07:15PM (#12063781)
Yep, all that above + `sed`.