Is there an editor or tool for Linux command line to format JSON data?
Vim is a file opener software that can be used to open the JSON file on Linux platform. GitHub Atom is a cross-platform tool to open JSON files. Other than these tools, you can use web browsers like Google Chrome and Mozilla Firefox to open JSON files, which we discuss in detail later.
Just insert code into the single box visible on the web page and press the “Format JSON” button. The desired re-formatted text will be displayed below. An “Un-Format JSON” button is available to edit JSON files back to their space-saving original form.
alias pp='python -mjson.tool' pp mydata.json
From the first link in the accepted answer: http://ruslanspivak.com/2010/10/12/pretty-print-json-from-the-command-line/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With