[issue34933] json.dumps serializes double quotes incorrectly

2018-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> print(json.dumps(a)) {"a": "//a[@asdf=\"asdf\"]"} You seen the repr or the resulting string, not the resulting string itself. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed

[issue34933] json.dumps serializes double quotes incorrectly

2018-10-08 Thread Juozas Masiulis
New submission from Juozas Masiulis : currently python behaves like this: >>> import json >>> a={'a': '//a[@asdf="asdf"]'} >>> json.dumps(a) '{"a": "//a[@asdf=\\"asdf\\"]"}' this behaviour is incorrect. the resulting string should be '{"a": "//a[@asdf=\"asdf\"]"}' The difference is that