I have parsed some JSON which looks like this:
{"bag": "saco", "balloon": "bal\u00e3o", "apple": "ma\u00e7\u00e3"}
It's got u
s and the accents aren't displayed properly.
I have prefixed my Python file with
#!/usr/bin/env python
# -*- coding: utf-8 -*-
and I have a dictionary which I dump into the JSON file like this:
new_dict = {}
// doing stuff with the dictionary
with open('myFile.json', 'w+') as fp:
json.dump(new_dict, fp)
Sorry I'm a newbie with Python. How can I make my script write the JSON file without the u and so that it displays the characters correctly?