Note: This is an old post. I now use jq (http://stedolan.github.io/jq/) instead of the formatjson
Node script described below, and I recommend that you do too.
I had some JSON files that were not indented consistently. I edit these files by hand, so I wanted a …