案例
Represent 'He said "hello".' as a JSON string
输入
He said "hello".Expected answer
"He said \"hello\"."- 转义级别
Minimal- 转义引号
Double- 兼容 JSON
On- 兼容 ES6
On- 大写十六进制
Off
Represent 'C:\\logs\\release.txt' as a JSON string
输入
C:\logs\release.txtExpected answer
"C:\\logs\\release.txt"- 转义级别
Minimal- 转义引号
Double- 兼容 JSON
On- 兼容 ES6
On- 大写十六进制
Off
Represent 'line one\nline two' as a JSON string
输入
line one
line twoExpected answer
"line one\nline two"- 转义级别
Minimal- 转义引号
Double- 兼容 JSON
On- 兼容 ES6
On- 大写十六进制
Off
Represent 'tab\tseparated' as a JSON string
输入
tab separatedExpected answer
"tab\tseparated"- 转义级别
Minimal- 转义引号
Double- 兼容 JSON
On- 兼容 ES6
On- 大写十六进制
Off
Represent "single quote: '" as a JSON string
输入
single quote: 'Expected answer
"single quote: '"- 转义级别
Minimal- 转义引号
Double- 兼容 JSON
On- 兼容 ES6
On- 大写十六进制
Off
complex
输入
4ec985786aa10a7515d8be2d.bin
115 bytes
下载Expected answer
null\0backspace\btab\tnewline\nverticaltab\x0bformfeed\fcarriagereturn\rdoublequote"singlequote\'hex\xa9unicode\u2665codepoint\u{1d306}- 转义级别
Special chars- 转义引号
Single- 兼容 JSON
Off- 兼容 ES6
On- 大写十六进制
Off
double quotes
输入
Hello "World"!Expected answer
Hello \"World\"!- 转义级别
Special chars- 转义引号
Double- 兼容 JSON
Off- 兼容 ES6
On- 大写十六进制
Off
single quotes
输入
Escape 'these' quotes.Expected answer
Escape \'these\' quotes.- 转义级别
Special chars- 转义引号
Single- 兼容 JSON
Off- 兼容 ES6
On- 大写十六进制
Off
special characters
输入
1203ab8e4358d1fe9949e85d.bin
100 bytes
下载Expected answer
Fizz & buzz\n\ttabbed newline\rcarriage returned line\nbackspace character: \"\b\" form feed character: \"\f\"- 转义级别
Special chars- 转义引号
Double- 兼容 JSON
Off- 兼容 ES6
On- 大写十六进制
Off
参数
| 参数 | 默认值 | 输入与选项 |
|---|---|---|
| 转义级别 | Special 字符 | Special 字符, Everything, Minimal |
| 转义引号 | Single | Single, Double, Backtick |
| 兼容 JSON | false | 开启或关闭 |
| 兼容 ES6 | true | 开启或关闭 |
| 大写十六进制 | false | 开启或关闭 |