I'm working on a project on my computer and I'm getting "not well-formed" error when trying to read a json object from a file located on my machine.
It happens on Firefox. In Chrome, I'm getting "XMLHttpRequest cannot load file...".
I've tried changing the Mime-type to application/json but in vain.
Could you please help?
My code :
$.ajax({
    url: 'json/local_json_file.json',
    dataType: 'json',  //or application/json
    type: 'get',
    cache:'false',
    success: function(data) {
        $(data).each(function(index,value) {
            //some code
        });
    }
});
 
     
    