问题 1
Why use JSON over XML?
Lighter and faster than XML as on-the-wire data format
JSON objects are typed while XML data is typeless
> JSON types: string, number, array, boolean,
> XML data are all string
Native data form for JavaScript code
> Data is readily accessible as JSON objects in your JavaScript
code vs. XML data needed to be parsed and assigned to variables through tedious DOM APIs
> Retrieving values is as easy as reading from an object property in your JavaScript code
JSON objects are typed while XML data is typeless
> JSON types: string, number, array, boolean,
> XML data are all string
Native data form for JavaScript code
> Data is readily accessible as JSON objects in your JavaScript
code vs. XML data needed to be parsed and assigned to variables through tedious DOM APIs
> Retrieving values is as easy as reading from an object property in your JavaScript code
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
这有帮助吗?
添加评论
查看评论