#!/usr/bin/env python
"""
Convert JSON data to human-readable form.

(Reads from stdin and writes to stdout)
"""

import sys
import simplejson as json
import os

progName = sys.argv[0]
progDir = os.path.dirname(progName)
sys.path.insert(0, progDir)


try:
  print json.dumps(
      json.loads(sys.stdin.read()), indent=4)
except Exception, exc: 
  sys.stderr.write(str(exc))

sys.exit(0)
