I developed a web application using IE9 and a text editor. It reads a JSON file, then fills some DIV elements according to that file and the logic of the JavaScript and jQuery code. Under IE9, it works perfectly.
Under Chrome, it fails to execute the $.getJSON() statement, so no data is available. Under FireFox, the $.getJSON() statement apparently runs (alert messages testify to this), but it doesn't read anything.
The JSON file passes JSONLint.
Neither Chrome nor FireFox indicate any errors.
I made a sample file using JSON data from the JSON site, validated it through JSONLint, then ran my code using that file. No difference--Chrome still ignores the $.getJSON() statement.
A relevant section of my code:
function buildTree(centralID) {
alert("Can we start, at least?");
$.getJSON('sample.json', function(data) {
alert("first success");
$.each(data.person, function(i, xdata) {
Chrome displays the first alert but not the second.
Any ideas?