“not well-formed” error in Firefox when loading JSON file with XMLHttpRequest

前端 未结 8 2312
青春惊慌失措
青春惊慌失措 2020-11-28 09:57

I\'m getting a \"not well-formed\" error in the error console of Firefox 3.0.7 when the JavaScript on my page loads a text file containing an object in JavaScript Object Not

8条回答
  •  半阙折子戏
    2020-11-28 10:10

    Have you tried using the MIME type for JSON?

    application/json
    

    You could also configure your server to send this MIME type automatically for .json files.

提交回复
热议问题