Skip to main content

Arguments

string
required
String to escape. The function reads this argument with string type checking.

Returns

string
Escaped JSON string content without the opening and closing quote. Quotes, backslashes, common control characters, and bytes below 0x20 are escaped.

Example

Escape a string for the inside of a JSON string without adding the surrounding quotes.