The toJSON()
method of the Performance
interface is a standard serializer: it returns a JSON representation of the performance object's properties.
myPerf = performance.toJSON()
Performance
object.var js; js = window.performance.toJSON(); console.log("json = " + JSON.stringify(js));
Specification | Status | Comment |
---|---|---|
High Resolution Time Level 2 The definition of 'toJSON() serializer' in that specification. | Editor's Draft | Defines toJson() . |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
toJSON() | No support | (Yes) | 25.0 (25.0) | ? | No support | No support |
Feature | Android | Android Webview | Edge | Firefox Mobile (Gecko) | Firefox OS | IE Phone | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|---|---|
toJSON() | No support | No support | (Yes) | 25.0 (25.0) | 1.2 (25.0) | ? | No support | ? | No support |
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Performance/toJSON