读书人

JSON(2:json.js文件使用)

发布时间: 2012-09-01 09:33:02 作者: rapoo

JSON(二:json.js文件使用)
JSON字符串:


JSON对象:

1、如果原型没有被增加的话则增加原型对象即if (!Object.prototype.toJSONString)
JSON中为JS扩充的方法有:
Example:// Parse the text. If a key contains the string 'date' then convert the value to a date.myData = text.parseJSON(function (key, value) {return key.indexOf('date') >= 0 ? new Date(value) : value;});

读书人网 >JavaScript

热点推荐