【发布时间】:2016-02-13 20:21:48
【问题描述】:
我面临一个问题,即 JSON.stringify 没有对 JSON 对象中的所有键进行字符串化。
即。 window.performance.getEntries()[0] 包含大约 17 个键。但是在转换为字符串时,结果只包含 4 个键。
如何转换window.performance.getEntries()[0]中的所有键?
我想要window.performance.getEntries() 的完整字符串输出,它是一个数组,我使用了JSON.stringify(window.performance.getEntries())。
提前谢谢..
【问题讨论】:
-
window.performance.getEntries()[0]的示例 -
抱歉,没有示例或截图,我们无法为您提供帮助...
-
为我工作
JSON.parse(JSON.stringify(window.performance.getEntries())).length == window.performance.getEntries().length == true你检查过解析停止的条目吗? -
@AlexK。 —
window.performance.getEntries()!=window.performance.getEntries()[0]问题是询问返回的数组中对象的属性,而不是数组本身的条目。 -
是的,但是 我想要 window.performance.getEntries() 的完整字符串输出
标签: javascript json stringify