• Parse JSON in JavaScript: eval gotcha

    November 24, 2009

    Recently I met the following obscure behaviour while working with AJAX queries that return JSON Data. In onLoadOk I had the following code: function onLoadOk(o) { try { data = eval(o.responseText); … } catch(e) { … } } However, in test harness if the response was underfined I did not reach the catch block, data […]

Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org