add form feed and backspace

This commit is contained in:
Semisol 2023-11-17 18:12:47 +03:00 committed by GitHub
parent 21d71791c8
commit 4d709d1804
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
01.md
View File

@ -46,11 +46,13 @@ To obtain the `event.id`, we `sha256` the serialized event. The serialization is
To prevent implementation differences from creating a different event ID for the same event, the following rules MUST be followed while serializing: To prevent implementation differences from creating a different event ID for the same event, the following rules MUST be followed while serializing:
- No whitespace, line breaks or other unnecessary formatting should be included in the output JSON. - No whitespace, line breaks or other unnecessary formatting should be included in the output JSON.
- No characters except the following should be escaped, and instead should be included verbatim: - No characters except the following should be escaped, and instead should be included verbatim:
- The line break, `0x0A`, as `\n` - A line break, `0x0A`, as `\n`
- A double quote, `0x22`, as `\"` - A double quote, `0x22`, as `\"`
- A backslash, `0x5C`, as `\\` - A backslash, `0x5C`, as `\\`
- A carriage return, `0x0D`, as `\r` - A carriage return, `0x0D`, as `\r`
- A tab character, `0x09`, as `\t` - A tab character, `0x09`, as `\t`
- A backspace, `0x08`, as `\b`
- A form feed, `0x0C`, as `\f`
- UTF-8 should be used for encoding. - UTF-8 should be used for encoding.
## Communication between clients and relays ## Communication between clients and relays