jQuery.parseJSON vs JSON.parse

后端 未结 7 1300
感情败类
感情败类 2020-11-27 06:29

jQuery.parseJSON and JSON.parse are two functions that perform the same task. If the jQuery library is already loaded, would using jQuery.parseJSON be better th

7条回答
  •  旧时难觅i
    2020-11-27 06:59

    According to jQuery

    Where the browser provides a native implementation of JSON.parse, jQuery uses it to parse the string.

    thus it means that jQuery provides a JSON parser if no native implementation exists on the browser. here's a comparison chart of browsers that have (and don't have) JSON functionality

提交回复
热议问题