Open the JSON file and load its contents Open the JSON file and load its contents with open("data.json", "r", encoding="utf-8") as file: data = json.load(file)