cities.json icon indicating copy to clipboard operation
cities.json copied to clipboard

Escape forward slashes

Open adem0x opened this issue 4 years ago • 1 comments

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.

adem0x avatar Aug 04 '21 22:08 adem0x

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 avatar Jun 23 '22 13:06 lutangar