Why does $.getJSON silently fail?

前端 未结 5 1088
闹比i
闹比i 2020-12-02 11:16

It seems very inconvenient that jQuery\'s $.getJSON silently fails when the data returned is not valid JSON. Why was this implemented with silent failure? What is the easies

5条回答
  •  隐瞒了意图╮
    2020-12-02 11:43

    If you're requesting JSONP as the response, you will get a silent fail if there is no response (e.g. network outage). See this thread for details.

提交回复
热议问题