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.

Author martin.panter
Recipients ezio.melotti, martin.panter, xaka
Date 2015-03-24.22:12:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427235123.02.0.212902642011.issue23766@psf.upfronthosting.co.za>
In-reply-to
Content
According to that RFC section, the forward solidus is allowed to be in an escape sequence, but it is also allowed unescaped:

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

. . .

unescaped = %x20-21 / %x23-5B / %x5D-10FFFF

In general, escaping the forward solidus is not needed, and is easier to read. Apparently this escaping is a workaround for embedding JSON inside a HTML <script> element, where the sequence “</” is not allowed, and HTML itself does not allow escaping: <http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.2>. In that case, JSON like {markup: "<i>italic<\/i>"} would be escaped, but most cases still do not need escaping, such as {url: "http://example.net/"}.
History
Date User Action Args
2015-03-24 22:12:03martin.pantersetrecipients: + martin.panter, ezio.melotti, xaka
2015-03-24 22:12:03martin.pantersetmessageid: <1427235123.02.0.212902642011.issue23766@psf.upfronthosting.co.za>
2015-03-24 22:12:03martin.panterlinkissue23766 messages
2015-03-24 22:12:02martin.pantercreate