list 类型的json数据
var source = ["10004","1234","4","3","1.5","0.5"] var res= JSON.parse(source ); res[0] 10004 res[1] 1234
对象类型的json数据解析
var source = {"uid":0,"userId":"124","username":小李","dept_id":"8"}; var res= JSON.parse(source ); res["userId"] 124 res["username"] 小李
var ret = [true,false,true,1,2,3,4,101,99]; var json = JSON.stringify(ret);
原文链接:https://www.f2er.com/cocos2dx/345908.html