JSON与String互转(Javascript)
文章分类:Web前端 关键字: json js
呵呵,正文,感觉周同学的支持.
JSON => String:
Js代码
//JSON对象转为String
function jsonToString(obj){
switch(typeof(obj)){
case ‘string’:
return ‘”‘ + obj.replace(/(["http://heweiya.javaeye.com/blog/442167