JSON

1583阅读 0评论2011-03-05 qqmmcc123
分类:嵌入式

import web.json;
io.open();
str = /*
{"State":false,"Message":"\u975e\u6cd5\u6570\u636e\u683c\u5f0f,\u8bf7\u8054\u7cfb115\u7f51\u76d8\u5ba2\u670d.code=3","Code":113}
*/;
var re = web.json.decode(str);
io.print(re["Code"]);

显示123

这个是标准的 JSON 格式,你调用 decode 方法,传入这个字符串,就可以返回 table
上一篇:web库函数
下一篇:从表格删除行