如何在 Firefox 的开发人员控制台中禁用自动字符串转义?
How do I disable auto string escape in Firefox's developer console?
来自 Chrome,我习惯于在开发人员 JS 控制台中生成非转义字符串:
> JSON.stringify(JSON.parse('{"a": 10}'))
{"a":10}
但是,在 Firefox 中,它会产生以下内容:
> JSON.stringify(JSON.parse('{"a": 10}'))
"{\"a\":10}" <-- notice that the quote has been escaped as \", which is correct, but not what I want
如何让 Firefox 停止转义 JS 控制台打印的字符串?
您可以像这样简单地使用 console.log():
> console.log(JSON.stringify(JSON.parse('{"a":10}')))
{"a":10}
干杯!
来自 Chrome,我习惯于在开发人员 JS 控制台中生成非转义字符串:
> JSON.stringify(JSON.parse('{"a": 10}'))
{"a":10}
但是,在 Firefox 中,它会产生以下内容:
> JSON.stringify(JSON.parse('{"a": 10}'))
"{\"a\":10}" <-- notice that the quote has been escaped as \", which is correct, but not what I want
如何让 Firefox 停止转义 JS 控制台打印的字符串?
您可以像这样简单地使用 console.log():
> console.log(JSON.stringify(JSON.parse('{"a":10}')))
{"a":10}
干杯!