akira added the comment:

json.dumps works correctly in this case.

Both json/application rfc [1] and ecma json standard [2] say:

> All characters may be placed within the quotation marks, except for the 
> characters that must be escaped: quotation mark (U+0022), reverse solidus 
> (U+005C), and the control characters (U+0000 through U+001F).

i.e., only a subset (00-1F) of control characters must be escaped in json string

[1]: https://tools.ietf.org/html/rfc7159#section-7
[2]: http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf

----------
nosy: +akira

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21194>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to