python json dump utf8
data = {
"name": "foo",
"age": 27
}
with open("test.json", 'w', encoding='utf8') as outfile:
json.dump(data, outfile, indent=2)
python json dump utf8
data = {
"name": "foo",
"age": 27
}
with open("test.json", 'w', encoding='utf8') as outfile:
json.dump(data, outfile, indent=2)
read json file python utf8
with open('keys.json', encoding='utf-8') as fh:
data = json.load(fh)
print(data)
# from stackoverflow : https://stackoverflow.com/questions/46408051/python-json-load-set-encoding-to-utf-8
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us