The following substitutions are made:
| Character | Replacement |
|---|---|
\ | \\ |
" | \" |
\r (carriage return) | \\r |
\n (line feed) | \\n |
\x08 (backspace) | \\b |
\x0c (form feed) | \\f |
\t (tab) | \\t |
| Characters from 0x00 to 0x1f and characters from 0x80 to 0xffff | \\u#### where #### is four hex digits |
Also see the jsonstringify Operator.