Skip to content
This repository was archived by the owner on Jul 7, 2020. It is now read-only.

Conversation

@tedpearson
Copy link

No description provided.

@cburroughs
Copy link
Contributor

I think escaping is actually technically correct http://www.json.org/string.gif

@tea-dragon
Copy link

Nope. It is optional. That picture is showing both options -- 'front slash' is also covered under the "any unicode character except [... etc]" block. The solidus is not considered a control character.

@tedpearson
Copy link
Author

"A string begins and ends with
quotation marks. 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).

Any character may be escaped." http://www.ietf.org/rfc/rfc4627.txt

Some argument about whether escaped slash is correct: ultrajson/ultrajson#110

The browser JSON.stringify() method doesn't escape front slashes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants