Uses JSON serialization for IE7 and IE6 if window.JSON is present.