Re: [community-group] Escape sequences are not defined (#167)

A backslash is indeed the most common form of escaping characters.
This is not unique or specific to JSON.

Example algorithm could be :

1. REVERSE SOLIDUS (\) is the current code point
2. consome the next code point
3. EOF -> this is parse error
4. return the current code point

example 1 :
- `"\\{ foo \\}"`
- `{ foo }`

example 2 :
- `"\\\\ foo \\\\"`
- `\ foo \`

example 3 :
- `"foo\\.bar"`
- `foo.bar`
- 
example 4 :
- `"foo\\"`
- parse error

```json
{
 "foo": {
  "$value": "\\{ foo \\}"
 },
 "bar": {
  "$value": "\\\\ foo \\\\"
 },
 "foo\\.bar": {
  "$value": 1
 }
}
```

All keys and all values would be required to be processed by this algorithms.

-- 
GitHub Notification of comment by romainmenke
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/167#issuecomment-1336524886 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 4 December 2022 21:45:30 UTC