import json data = { "protocol": "brc-20", "name": "Ethereal Essence", "ticker": "ETHX", "description": "Transcending the mundane.", "total_supply": 21000000, "operations": { "burn": True, "freeze": True, "rebase": True, "governance": True } } # Serialize the data with proper indentation and newline handling json_str = json.dumps(data, indent=4, ensure_ascii=False) with open('new.json', 'w') as f: f.write(json_str)