News for hackers. Stuff that matters.
Re:Pretty-printing JSON and XML on Mac OSX by georgecalm on Sunday November 13, 2011 @06:19PM (#3232110)
Nice! You can set up the following aliases in ~/.zshrc (or ~/.bashrc):

  alias json="python -mjson.tool"
  alias xml="xmllint --format -"
then pipe into them like so:

  echo '{"one": 1}' | json
  echo "<one>1</one>" | xml

There are no comments on this comment yet.