Convert JS object to JSON string
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"}‘
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。