教程集 www.jiaochengji.com
教程集 >  jQuery  >  jQuery 插件  >  正文 jQuery的JSON插件 JSON Parser

jQuery的JSON插件 JSON Parser

发布时间:2014-05-07   编辑:jiaochengji.com
This plugin makes it simple to convert to and from JSON. Most people asked me why I would want to do such a thing, which boggles my mind. Javascript makes it relatively easy to convert from JSON, thanks to eval(), but converting to JSON is supposedly an e
This plugin makes it simple to convert to and from JSON. Most people asked me why I would want to do such a thing, which boggles my mind. Javascript makes it relatively easy to convert from JSON, thanks to eval(), but converting to JSON is supposedly an edge requirement. This plugin exposes four new functions onto the $, or jquery object: toJSON: Serializes a javascript object, number, string, or arry into JSON. evalJSON: Converts from JSON to Javascript, quickly, and is trivial. secureEvalJSON: Converts from JSON to Javascript, but does so while checking to see if the source is actually JSON, and not with other Javascript statements thrown in. quoteString: Places quotes around a string, and inteligently escapes any quote, backslash, or control characters.

您可能感兴趣的文章:
jQuery的JSON插件 JSON Parser
jQuery URL Parser
XML to JSON
jQuery.xml2json
jQuery1.4.2与老版本json格式兼容的解决方法
为jQuery.Treeview添加右键菜单的实现代码
jquery JSON的解析方式
jQuery日历插件 jQuery Week Calendar
jQuery下拉框插件 FlexBox
jquery解析JSON数据示例代码

[关闭]
~ ~