Looking to build a work-around of the following.
$.getJSON(\'myfile.json\', function (data) {
showAll(data);
});
I want to avoid using a we
AJAX is about making asynchronous HTTP requests. You need a web server to make those requests and receive those responses. JQuery's .get()
method won't let you avoid a web server.
The only way I can think of would be to include an iframe in your code and set the source of the iframe to your resource that includes the JSON. Then, you could use JSON.parse()
on the contents of the iframe.