JSON is far better than XML! Less code to transfer – faster parsing – happy user. Right ? Hold that thought for a minute…
Alarmed we thought of removing nesting and moving the whole thing to JSON. No parsing – no creating JS objects means better performance and a happy user right ? Wrong!Â It became a lot worse – 3 seconds became 15 and IE would just freeze. Some searching led us to John’s blog and to native JSON parsing. John gives a fair picture of how long it takes to parse JSON in comparison to XML.
And that is with just 1600 nodes of date records, think of 200 nested arrays and such! Solution andÂ strategies to this will hopefully be in another post.
PS: IE8 and Firefox 3.5Â have native JSON support. But IE7 doesn’t and its going to take a while before our customers move to IE8.