来自网站:
Backbone's only hard dependency is either Underscore.js ( > 1.4.3) or Lo-Dash. For RESTful persistence, history support via Backbone.Router and DOM manipulation with Backbone.View, include json2.js, and either jQuery ( > 1.4.2) or Zepto.
为什么会提到json2.js?我已经在 ie7-9 和其他浏览器中运行我的应用程序而不需要这个文件并且它可以工作。这是性能问题吗?
最佳答案
json2.js提供了Backbone依赖的JSON.parse
和JSON.stringify
函数。 They've been included in browsers for a while但它可能已列出,以防您的环境不包含它,或者您希望在您的应用中实现一致。
关于javascript - Backbone.js 需要 json2.js?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14075330/