jquery - JSON File Extension -
jquery - JSON File Extension -
i've been saving json files .txt extension , worked jquery ajax calls.
when alter extension .json , in jquery ajax phone call -- jquery.ajax() -- specify
datatype: "json", contenttype: "application/json; charset=utf-8",the files no longer work. why so?
shouldn't json files have extension .json? i'm using iis server.
json
{ "rows": [
{"row":[ {"cells": [ {"data": "edit"}, {"data": "030194"} ]} ]}, {"row":[ {"cells": [ {"data": "add"}, {"data": "030194"} ]} ]}
]}
jquery
jquery.ajax ({
type: "get", url: "localhost/abc.json", datatype: "json", contenttype: "application/json; charset=utf-8", cache: "false", success: function(response){}
});
can please tell me why extension .json not working? works if alter .txt
the right extension .json
, , mime type application/json
(reference: this wikipedia page). speaking, however, should work extension long info construction valid , web server doing it's supposed to.
json jquery file-extension
Comments
Post a Comment