I'm receiving a list of location names like this
region_response = json.loads(requests.get(region_req_url).text)
Many of the names have characters represented like Tor\u00f6 Stenstrand
in the response, where that place name would be Torö Stenstrand
.
I'm then adding some of the received elements to a dictionary and saving that to a new JSON file
with open('spots.json', 'w') as wf:
json.dump(results, wf, skipkeys=False, ensure_ascii=True, indent=4)
The resulting file also has the escaped characters like \u00f6
but I need this to have the actual representations like ö
.
My work so far is in this repo, specifically in magicseaweed.py and windguru.py.
Apologies if this has been answered before, or if my description/assumptions above are incorrect - I've been trying to work this out for quite a while now, but I don't think I understand the area enough to know exactly what I should be looking for or reading up on! Any help/suggestions/pointers would be massively appreciated.