Moris' Note Book

本博客所有内容皆收集于网上,非本人原创,非心情日记,非研究心得,只是自己浏览的东西的收集
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

json stringifying array problem

Posted on 2006-03-19 11:57  moris  阅读(174)  评论(0)    收藏  举报

using json.js from http://www.json.org/json.js

for array with the string keys

var test = new Array;

test["i1"]="v1";

test["i2"]="v2";

test["i3"]="v3";

var test_text = JSON.parse(stringify);

//test_text: []

if dim test as object, the json act as your expected.

var test = new Object;