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

JSON2 與 jquery-json

JSON2 vs. jquery-json(JSON2 與 jquery-json)
本文介紹了JSON2 與 jquery-json的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

這可能是一個(gè)簡(jiǎn)單的問(wèn)題,我似乎找不到可靠的答案.

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/)?假設(shè)一個(gè) Web 應(yīng)用程序開始使用 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.

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

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.

推薦答案

兩者的一個(gè)重要區(qū)別是json2的api和native api完全一樣,而jquery-json是jquery插件(和falling略有不同)回到本機(jī)實(shí)現(xiàn)).

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).

我會(huì)說(shuō)你的答案取決于你想使用哪個(gè) api,因?yàn)闊o(wú)論哪種實(shí)現(xiàn),你都會(huì)得到相同的結(jié)果(你至少應(yīng)該這樣做).

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).

作為一個(gè)思想實(shí)驗(yàn),讓我們假設(shè)每個(gè)瀏覽器都有一個(gè)原生 JSON api 實(shí)現(xiàn).你還會(huì)使用 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.

如果不是,那么當(dāng)原生 api 已經(jīng)眾所周知(即使它沒(méi)有全局實(shí)現(xiàn))時(shí),為什么要將代碼綁定到 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)?

如果這對(duì)你來(lái)說(shuō)意味著什么,John Resig(jQuery 的創(chuàng)建者)說(shuō)過(guò) 與此同時(shí),請(qǐng)開始將使用 JSON 的應(yīng)用程序遷移到 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"

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

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

相關(guān)文檔推薦

jQuery/JavaScript Library for avatar creation?(用于創(chuàng)建頭像的 jQuery/JavaScript 庫(kù)?)
How to do following mask input problem?(如何做以下掩碼輸入問(wèn)題?)
Issues Setting Value/Label Using DropKick Javascript(使用 DropKick Javascript 設(shè)置值/標(biāo)簽的問(wèn)題)
how to unit-test private methods in jquery plugins?(如何對(duì) jquery 插件中的私有方法進(jìn)行單元測(cè)試?)
stellar.js - configuring offsets / aligning elements for a vertical scrolling website?(stellar.js - 為垂直滾動(dòng)網(wǎng)站配置偏移量/對(duì)齊元素?)
jQuery masked input plugin. select all content when textbox receives focus(jQuery 屏蔽輸入插件.當(dāng)文本框獲得焦點(diǎn)時(shí)選擇所有內(nèi)容)
主站蜘蛛池模板: 在线视频99 | 欧美成人精品一区二区三区 | 四虎官网 | 香蕉视频免费 | 中文字幕一区二区三区乱码 | 黄色一级在线观看 | igao在线观看 | 97免费在线视频 | 日韩视频专区 | 中国一级毛片免费看 | 精品影院 | 一级做a爱片性色毛片 | av网站在线免费观看 | 青青草原国产 | 91免费福利视频 | 亚洲精品视频免费在线观看 | 国产成人精品一区二区三区福利 | 亚洲综合视频在线观看 | 亚洲国产成人精品女人久久久 | 91精品麻豆 | 毛片毛片毛片毛片毛片 | 国产超碰在线观看 | 黄网站视频 | 91福利在线观看 | 成人黄色在线观看 | 成人在线视频播放 | 久久九九精品 | 久久91| 久插视频| 日韩福利视频 | 午夜免费 | 黄色片一级片 | 免费观看a级片 | 亚洲综合视频在线 | 免费成人蒂法网站 | 欧美日韩精品久久 | 国产中文字幕在线播放 | 天天综合影院 | 黄色小视频在线观看 | 俺去俺来也在线www色官网 | h视频在线播放 |