beautify json python

JavaScript
>>> import json
>>> print json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4)
{
    "4": 5,
    "6": 7
}python3 -m json.tool unformatted.json > formatted.json
Source

Also in JavaScript: