Yesterday I bumped into a very handly utility to beautify JSON data directly from your command line.
Let’s say that, with a command, you are retrieving some data in JSON format1:
1 2 3 4 |
|
Of course, the result doesn’t really look readable, but thanks to a python utility we can directly expand and beautify our JSON by piping:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
That’s all, folks!
Notes
- In my case, I am retrieving data from OrientDB, a NoSQL graph=document DB which handles data in JSON format over its HTTP interface ↩