Skip to main content

参数

string
必填
要 quote 的 string。function 使用 string type checking 读取这个 argument。

返回值

string
包含 opening 和 closing quote 的 complete JSON string literal。Quotes、backslashes、common control characters 和 bytes below 0x20 会被 escape。

示例

将 string convert 为 complete quoted JSON string literal。