Skip to main content

Arguments

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

Returns

string
Complete JSON string literal including the opening and closing quote. Quotes, backslashes, common control characters, and bytes below 0x20 are escaped.

Example

Convert a string into a complete quoted JSON string literal.