I know that the pprint
python standard library is for pretty-printing python data types. However, I\'m always retrieving json data, and I\'m wondering if there is a
I used following code to directly get a json output from my requests-get result and pretty printed this json object with help of pythons json libary function .dumps() by using indent and sorting the object keys:
import requests
import json
response = requests.get('http://example.org')
print (json.dumps(response.json(), indent=4, sort_keys=True))