Answers for "json dump as utf8"

1

python json dump utf8

data = { 
  "name": "foo",
  "age": 27
}
with open("test.json", 'w', encoding='utf8') as outfile:
    json.dump(data, outfile, indent=2)
Posted by: Guest on June-22-2021
0

python json write utf 8

with open('speechbase.json', 'w') as jsonfile:
	json.dump(DATA, jsonfile, indent = 4)
Posted by: Guest on April-12-2020

Python Answers by Framework

Browse Popular Code Answers by Language