Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape forward slashes #5

Closed
adem0x opened this issue Aug 4, 2021 · 1 comment
Closed

Escape forward slashes #5

adem0x opened this issue Aug 4, 2021 · 1 comment

Comments

@adem0x
Copy link

adem0x commented Aug 4, 2021

cities.json inclues a lot of string values that have unescaped forward slashes ('/').

According to https://www.json.org/json-en.html , these are the characters than must be escaped; and forward slash ('/') is among them.

Chars to be escaped:
'"'
''
'/'
'b'
'f'
'n'
'r'
't'
'u' hex hex hex hex

A quick search and replace solves the issue but not doing it cause unexpected results.

@lutangar
Copy link
Owner

Hi there, I can't seem to produce a failing test case.

A quick search and replace solves the issue but not doing it cause unexpected results.

Could you be more specific?

A quick run through this topic seems to point out it's not required by the Json spec per se :

The JSON spec says you CAN escape forward slash, but you don't have to.

https://stackoverflow.com/questions/1580647/json-why-are-forward-slashes-escaped

@lutangar lutangar closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants