Monday, November 5, 2012

Format json file using Python

Json files being what they are, are usually badly formatted. Here's a neat way to pretty print (and validate) any json file using the json.tool module of Python:
    python -m json.tool example.json
Find json.tool here.

No comments: