Python Forum
json.dumps save some unicode chars as code, not char
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
json.dumps save some unicode chars as code, not char
#2
OK, found it
with open('docs_new.json', 'w') as f:
    f.write(json.dumps(my_json, indent=2, ensure_ascii=False))
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: json.dumps save some unicode chars as code, not char - by buran - Aug-02-2018, 04:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to save to multiple locations during save cubangt 1 566 Oct-23-2023, 10:16 PM
Last Post: deanhystad
  Can't stop keyboard listener to grab chars typed inside CTk window Valjean 9 1,379 Sep-25-2023, 08:07 PM
Last Post: deanhystad
Sad How to split a String from Text Input into 40 char chunks? lastyle 7 1,166 Aug-01-2023, 09:36 AM
Last Post: Pedroski55
  cut string after tow known chars? korenron 3 1,529 Oct-28-2021, 01:23 PM
Last Post: korenron
  How to save json data in a dataframe shantanu97 1 2,169 Apr-15-2021, 02:44 PM
Last Post: klllmmm
  Request for Python code - Features extraction from JSON file (cuckoo) thinker 1 2,208 Apr-07-2021, 04:40 PM
Last Post: Larz60+
  Code failed JSON KeyError popps 3 2,433 Jan-15-2021, 03:45 PM
Last Post: buran
  How to replace on char with another in a string? korenron 3 2,376 Dec-03-2020, 07:37 AM
Last Post: korenron
  How to remove char from string?? ridgerunnersjw 2 2,576 Sep-30-2020, 03:49 PM
Last Post: ridgerunnersjw
  json.dumps list output qurr 12 5,271 Apr-08-2020, 10:13 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020