久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

JSON2 與 jquery-json

JSON2 vs. jquery-json(JSON2 與 jquery-json)
本文介紹了JSON2 與 jquery-json的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

這可能是一個簡單的問題,我似乎找不到可靠的答案.

This is probably a simple question, which I can't seem to find a solid answer to.

為什么要選擇 JSON2 而不是 jquery-json 插件(http://code.google.com/p/jquery-json/)?假設一個 Web 應用程序開始使用 jQuery.

Why would one choose JSON2 over jquery-json plugin (http://code.google.com/p/jquery-json/)? Given that a web application is using jQuery to begin with.

每個人都在寫 JSON2 依賴于原生實現的偉大之處;好吧,jquery-json 也是如此.我歡迎指向博客、文章和示例的鏈接.但是,我正在尋找一個強有力的可靠答案,說明哪個更好用以及為什么.

Everyone's writing about how great it is that JSON2 falls back on the native implementation; well, so does jquery-json. I welcome links to blogs, articles and examples. However, I'm looking for a strong solid answer on which one is better to use and why.

推薦答案

兩者的一個重要區別是json2的api和native api完全一樣,而jquery-json是jquery插件(和falling略有不同)回到本機實現).

An important difference between the two is that JSON2's api is exactly the same as the native api whereas jquery-json is a jquery plugin (which is slightly different than falling back on the native implementation).

我會說你的答案取決于你想使用哪個 api,因為無論哪種實現,你都會得到相同的結果(你至少應該這樣做).

I would say your answer depends on which api you want to use since you'll get the same results with either implementation (you should at least).

作為一個思想實驗,讓我們假設每個瀏覽器都有一個原生 JSON api 實現.你還會使用 jquery-json 嗎?

As a thought experiment, let's imagine that every browser had a native JSON api implementation. Would you still use jquery-json?

如果有,那就用jquery插件吧.

If so, then use the jquery plug-in.

如果不是,那么當原生 api 已經眾所周知(即使它沒有全局實現)時,為什么要將代碼綁定到 jquery-json api?

If not, then why would you tie your code to the jquery-json api when the native api is already well-known (even if its not globally implemented)?

如果這對你來說意味著什么,John Resig(jQuery 的創建者)說過 與此同時,請開始將使用 JSON 的應用程序遷移到 Crockford 的 json2.js"

If it means anything to you, John Resig (the creator of jQuery) has said "In the meantime PLEASE start migrating your JSON-using applications over to Crockford's json2.js"

這篇關于JSON2 與 jquery-json的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

jQuery/JavaScript Library for avatar creation?(用于創建頭像的 jQuery/JavaScript 庫?)
How to do following mask input problem?(如何做以下掩碼輸入問題?)
Issues Setting Value/Label Using DropKick Javascript(使用 DropKick Javascript 設置值/標簽的問題)
how to unit-test private methods in jquery plugins?(如何對 jquery 插件中的私有方法進行單元測試?)
stellar.js - configuring offsets / aligning elements for a vertical scrolling website?(stellar.js - 為垂直滾動網站配置偏移量/對齊元素?)
jQuery masked input plugin. select all content when textbox receives focus(jQuery 屏蔽輸入插件.當文本框獲得焦點時選擇所有內容)
主站蜘蛛池模板: 国产高潮好爽受不了了夜夜做 | 一区二区在线 | 精品成人一区 | 久久99成人 | 国产视频精品免费 | 中文字幕91av | 国产免费一区二区 | 国产一级片免费在线观看 | 91综合网 | 精品1区| 欧美精品一区在线 | 日本一区二区三区四区 | 香蕉av免费| 天天干夜夜操 | 精品日韩一区二区 | 久热精品在线播放 | 欧美午夜视频 | 精品国产一区三区 | 国产成人精品午夜视频免费 | 欧美精品电影一区 | 欧美精品一区二区在线观看 | 在线综合视频 | 中文字幕蜜臀 | 一区二区三区免费观看 | 国产一区二区电影网 | 韩日在线观看视频 | 91精品国产乱码久久蜜臀 | 久草新在线 | 在线看片网站 | 精品国产不卡一区二区三区 | 狠狠久久| 免费观看成人av | 国产99视频精品免费播放照片 | 暖暖日本在线视频 | 美女在线视频一区二区三区 | 亚洲欧美成人影院 | 91文字幕巨乱亚洲香蕉 | 日韩在线观看精品 | 野狼在线社区2017入口 | 久久在线 | 一区二区av|