完成json stringify

时间:2013-02-05 07:04:07

标签: javascript json

如何转换

var blockobject= new Array();
blockobject[blockobject.length]={area:"1",markerid:[{position:"(34.689703991083334, 135.50275325775146)",title:"sometitle"},{position:"24.689703991083334, 125.50275325775146",title:"sometitle"}]};

进入字符串 我试过

var saveobject = JSON.stringify(blockobject,["markerid","area"]);
alert(saveobject);

返回

      [{"markerid":[{},{}],"area":"1"}]

我正在使用json2.js

0 个答案:

没有答案