ruebenramirez / blog

My blog
http://blog.ruebenramirez.com/
7 stars 0 forks source link

format json on the command line #421

Open rramirez-duo opened 5 years ago

rramirez-duo commented 5 years ago

I have this json file that's pretty ugly to read, right....

https://github.com/kristovatlas/osx-config-check/blob/master/osx-config.json

but I want to see what exactly is in this file, so I started digging for an easy to use json whitespace formatter to make this easier to read.

I found cat osx-config.json | python -m json.tool | less to be the easiest way to read the contents of this file.

source: https://stackoverflow.com/a/32228333