I've been playing with the new window.msPerformance that's part of IE9 as explained in this blog post: http://blogs.msdn.com/b/ie/archive/2010/06/28/measuring-web-page-performance.aspx. Of course, the main thing you want to do is capture this data. The blog post mentions that you can use the stringify method to serialize the object to JSON and then send the diagnostics back to the server.  Well, I tried this with no luck. Here's what my code looked like:

   <script type="text/javascript" >
        function test() {
            if (window.msPerformance != null) {


                var json = JSON.stringify(window.msPerformance.timing);
                alert(window.msPerformance.timing);
                alert(json);
            }
        }
</script>

Even though the performance object was populated, the serialization to JSON failed.

I did some digging around and learned that the native JSON method in IE9 doesn't successfully stringify native objects, like anything hanging off window or document.  However, I was able to work around this by using Crockford's JSON class from here: http://www.json.org/js.html.  The one thing I had to do was to change the prototype to JSON2 so that the browser's native JSON prototype wasn't called. Then it worked!