moonsharp icon indicating copy to clipboard operation
moonsharp copied to clipboard

JSON parse error for "\/"

Open Frank-Buss opened this issue 5 years ago • 1 comments

The "tiled" editor creates a JSON file like this:

    "source":"..\/..\/desert.tsx"

This results in a parse error. According to Wikipedia (https://en.wikipedia.org/wiki/JSON) it should be valid: "For example, escaping a slash (/) with a backslash () is valid in JSON". This would fix it in LexerUtils.cs#UnescapeLuaString:

    else if (c == '/') { sb.Append('/'); escape = false; }

Frank-Buss avatar Jun 19 '20 21:06 Frank-Buss

This has since been fixed in commit 714c265.

Joy-less avatar Aug 15 '23 13:08 Joy-less