JSON 和 RSS 提要 - 区别? [英] JSON and RSS feeds - difference?
问题描述
JSON 和 RSS 提要有什么区别?
What are the differences between JSON and RSS feeds?
除了:
JSON 提要的格式为JavaScript 可以很容易地直接使用.
A JSON feed is in a format that a JavaScript can easily use directly.
浏览器可以消耗大量JSON 比它们更有效可以消耗大量的 XML 和差距正在扩大,因为最近浏览器的版本现在是提供原生的、安全的支持编码和解码 JSON.
Browsers can consume large amount of JSON much more efficiently than they can consume large amount of XML and the gap is widening because the latest versions of the browsers are now providing native, safe support for encoding and decoding JSON.
推荐答案
如果您使用的是 JavaScript,那么您就会知道 DOM 是多么麻烦.我建议使用 JSON 只是因为它更容易编程.我还取决于您将其发送到何处,无论您的客户是否支持 RSS 或 JSON.
If you are using JavaScript then you know what a hassle the DOM can be. I would suggest using JSON just because it is easier to program for. I also depends on where you are sending it, whether or not your clients support RSS or JSON.
其他:
- JSON 在视觉上更容易调试
- 服务器端语言中有很多很好的 JSON 库
- 比 RSS 更紧凑
- 您可以定义自己的 api/protocol(RSS 是标准)
这篇关于JSON 和 RSS 提要 - 区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!