I think

                                        if ( window.JSON && window.JSON.parse ) 
{
                                                data = window.JSON.parse( data 
);

                                        } else {
                                                data = window["eval"]("(" + 
data + ")");
                                        }

is better than

                                        if ( window.JSON && window.JSON.parse ) 
{
                                                data = window.JSON.parse( data 
);

                                        } else {
                                                data = (new Function("return " 
+ data))();
                                        }

.

because "new Function()" is not allow after page loaded.



from AIR doc)   :

Function constructor
Calls to new Function(param, body) can be replaced with an inline
function declaration or used only before the page load event has been
handled.

Reply via email to