$.ajax({type:"GET",url:filename,async:false,beforeSend:function(x){if(x&&x.overrideMimeType){x.overrideMimeType("application/j-son;charset=UTF-8");}},dataType:"json",success:function(data){//do your stuff with the JSON data}});
1$.ajax({ 2type:"GET", 3url:filename, 4async:false, 5beforeSend:function(x){ 6if(x&&x.overrideMimeType){ 7x.overrideMimeType("application/j-son;charset=UTF-8"); 8} 9},10dataType:"json",11success:function(data){12//do your stuff with the JSON data13}14});