Created
July 22, 2016 20:03
-
-
Save ambud/d256666d588fbf46aeb0b7ba03c0befd to your computer and use it in GitHub Desktop.
Output pretty JSON in bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo '<JSON>' | python -c'import fileinput, json; print(json.dumps(json.loads("".join(fileinput.input())), sort_keys=True, indent=4))' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment