4 ms·
If you're familiar with vim, you can do this cat unformatted.json | python -mjson.tool | vim - And then use vim's folding methods to navigate the file (http
by i0exception 10y ago
If you're familiar with vim, you can do this
cat unformatted.json | python -mjson.tool | vim -
And then use vim's folding methods to navigate the file (http://vim.wikia.com/wiki/Folding http://vim.wikia.com/wiki/Folding)
- burkemw3 10y agoI use json.tool a lot too, but usually pipe it to `less`, using the paging and searching.
- ferrari8608 10y agoIt's not nice to abuse innocent cats. python -mjson.tool < unformatted.json | vim - If you're not using cat to concatenate things, the shell can probably handle the job.
- HappyTypist 10y agoPeople like cat because it allows notating the command closer to how they think. How can I pipe while putting the file first?
- yoha 10y agoWell, just do it: < unformatted.json python -mjson.tool | vim -
- thiht 10y agoWhat's the immediate advantage for me in using a less intuitive syntax? I understand cat is meant to concatenate files, so what?