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

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -