python json dump utf8

Solutions on MaxInterview for python json dump utf8 by the best coders in the world

showing results for - "python json dump utf8"
Laura
04 Sep 2019
1data = { 
2  "name": "foo",
3  "age": 27
4}
5with open("test.json", 'w', encoding='utf8') as outfile:
6    json.dump(data, outfile, indent=2)