# read the JSON file and also print the file content in JSON format. with open(filename, 'r') as f: d = json.load(f) print(json.dumps(d, indent=2))