escapeForJson

Escapes this string for safe inclusion inside a JSON string literal.

Backslash, double-quote, and the standard control characters (\n, \r, \t, \b, \f) are emitted as their JSON escape sequences; any remaining control character below 0x20 is emitted as a \\uXXXX escape. All other characters, including multi-byte Unicode, pass through unchanged.