Ask Your Question

one json viewer editor not online ?

asked 2017-06-07 09:46:25 -0500

sergiomb gravatar image

I'd like have an json viewer editor like but in my laptop that works offline


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-06-07 11:57:37 -0500

muep gravatar image

I do not know of a fully similar tool, but for a similar purpose I would likely use some small script like this one:


import json
import sys

tree = json.load(sys.stdin)
print(json.dumps(tree, indent=4, sort_keys=True))

If I save this to some location that is in my PATH variable e.g. in ~/bin/json-prettify, I can then have the dense json in some file and in terminal I can run a command like json-prettify < ugly.json and I will see the pretty-printed json in that same terminal.

I can think of ways in which a more complex purpose-built interactive tool would be more convenient, but I am not aware of anything that I could recommend. If you want such a tool, hopefully someone else is able to suggest one.

One thing you could attempt would be to just download the html code and any referenced javascript/css files from one of these online tools to a local directory and try if you could point your web browser at those. It would still be in a browser but might work offline just fine.

edit flag offensive delete link more

answered 2017-06-08 15:06:10 -0500

TMSZ gravatar image

There is eclipse with plugins, there is vim.

I think there is no specialized editor for linux but you can run windows applications using Wine.

Also, I don't see the reason for using browser-based editors. I've tested few and I haven't seen anyone that can handle medium size file (~1MB, 30k elements). One can load it quickly thanks to lazy tree loading but hangs if big array is expanded, so is still not usable. For small files any text editor with javascript highlighting, brace matching and collapsing would work as well.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-06-07 09:46:25 -0500

Seen: 352 times

Last updated: Jun 08 '17