If you want to add indentation to your JSON file to improve readability, add indent parameter to json.dumps method.
indent
json.dumps
The code above shows the output of json.dumps method after adding indent=4.
indent=4