This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add ensure_ascii argument to json.tool
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Add an option to json.tool to bypass non-ASCII characters.
View: 27413
Assigned To: Nosy List: qingyunha, r.david.murray
Priority: normal Keywords: patch

Created on 2017-08-16 05:46 by qingyunha, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
jsontool.patch qingyunha, 2017-08-16 05:46
Messages (2)
msg300327 - (view) Author: TaoQingyun (qingyunha) * Date: 2017-08-16 05:46
Sometimes I want this
```
$ echo -e '"\xe4\xbd\xa0\xe5\xa5\xbd"' | ./python -m json.tool --no-escape                         
"你好"
```

not just 
```
$ echo -e '"\xe4\xbd\xa0\xe5\xa5\xbd"' | ./python -m json.tool
"\u4f60\u597d" 
```
msg300353 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2017-08-16 12:21
This is a duplicate of issue 27413.
History
Date User Action Args
2022-04-11 14:58:50adminsetgithub: 75399
2017-08-16 12:21:46r.david.murraysetstatus: open -> closed

superseder: Add an option to json.tool to bypass non-ASCII characters.

nosy: + r.david.murray
messages: + msg300353
resolution: duplicate
stage: resolved
2017-08-16 05:46:56qingyunhacreate