- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
Issue37944
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.
Created on 2019-08-25 13:41 by Origami Tobiichi, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg350456 - (view) | Author: Karthikeyan Singaravelan (xtreak) * ![]() |
Date: 2019-08-25 13:46 | |
Can you please add a description to explain the report? |
|||
| msg350457 - (view) | Author: Origami Tobiichi (Origami Tobiichi) | Date: 2019-08-25 13:54 | |
I tried something like this:
```python
print(r'{"foo": "\\\""}')
print('{"foo": "\\\""}')
print(json.loads(r'{"foo":"\\\""}'))
```
On my machine it output like this:
```
{"foo": "\\\""}
{"foo": "\""}
{'foo': '\\"'}
```
But in most of online json parser, string `{"foo": "\\\""}` will be parsed as `{"foo":"\""}`
I'm not a specialist of JSON at all. If the standard of JSON hasn't said anything of it, please point it out in Python's Document at least.
When I ask my friend to run the code, he got the same result as me. And my friend is using lastest Arch Linux at that time(2019/08/26).
My python version: 3.7.4
System version: Linux 4.19.66-1-MANJARO
|
|||
| msg350458 - (view) | Author: Origami Tobiichi (Origami Tobiichi) | Date: 2019-08-25 14:00 | |
I hope I have given enough infomations. And I'm not good at English, please forgive some of my spell wrong, thanks. |
|||
| msg350465 - (view) | Author: Origami Tobiichi (Origami Tobiichi) | Date: 2019-08-25 15:15 | |
I'm sorry that I remove you from list, actually it's my first time to commit an issue on there and I'm afraid I used it wrong. |
|||
| msg350880 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2019-08-30 14:26 | |
There is no a bug.
"\\\"" is the same as r"\\" -- a 2-charackter string consisting of a backslash character and a doublequote character. r"\\\"" is a different string, it contains 3 backslash characters.
>>> print("\\\"")
\"
>>> print(repr("\\\""))
'\\"'
|
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:19 | admin | set | github: 82125 |
| 2019-08-30 14:26:40 | serhiy.storchaka | set | status: open -> closed resolution: not a bug messages: + msg350880 stage: resolved |
| 2019-08-30 10:02:28 | xtreak | set | nosy:
+ serhiy.storchaka |
| 2019-08-25 15:15:56 | Origami Tobiichi | set | nosy:
+ xtreak messages: + msg350465 |
| 2019-08-25 14:00:28 | Origami Tobiichi | set | messages: + msg350458 |
| 2019-08-25 13:54:38 | Origami Tobiichi | set | nosy:
- xtreak messages: + msg350457 title: About json.load(s -> Adjacent escape character in json.load() |
| 2019-08-25 13:46:00 | xtreak | set | nosy:
+ xtreak messages: + msg350456 |
| 2019-08-25 13:41:13 | Origami Tobiichi | create | |


