Aug-02-2018, 03:56 PM
I use
Part of it was in the original json file and was correct, part of text comes from scraping a website. In both cases in the result file it writes the code.
when I print my_json object, it looks ok.
I'm stuck, what is wrong?
Using python3.5, Linux Mint
with open('docs_new.json', 'w') as f: f.write(json.dumps(my_json, indent=2))to write a json object to a file. Some chars are printed as unicode, not chars, e.g.
\u201cCreate a new App\u201d
instead of “Create a new App”
Part of it was in the original json file and was correct, part of text comes from scraping a website. In both cases in the result file it writes the code.
when I print my_json object, it looks ok.
I'm stuck, what is wrong?
Using python3.5, Linux Mint