码迷,mamicode.com
首页 > Web开发 > 详细

Convert JS object to JSON string

时间:2014-08-12 13:08:24      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:ar   ui   js   on   rom   ca   json   as   

Modern browsers (IE8, FF3, Chrome etc.) have native JSON support built in (Same API as with JSON2).

So as long you‘re not dealing with IE6/7 you can do it just as easily as that:

var j={"name":"binchen"};
JSON.stringify(j); // ‘{"name":"binchen"}‘

Convert JS object to JSON string,布布扣,bubuko.com

Convert JS object to JSON string

标签:ar   ui   js   on   rom   ca   json   as   

原文地址:http://www.cnblogs.com/shgq/p/3906906.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!