对象转字符串
var obj = {a:'a', b:'b', c:'c'}
Ext.encode(obj);
//"{"a":"a","b":"b","c":"c"}"
字符串转对象
var b = '{"a":"a","b":"b","c":"c"}';
var c = Ext.decode(b);
//{a:'a', b:'b', c:'c'}
对象转字符串
var obj = {a:'a', b:'b', c:'c'}
Ext.encode(obj);
//"{"a":"a","b":"b","c":"c"}"
字符串转对象
var b = '{"a":"a","b":"b","c":"c"}';
var c = Ext.decode(b);
//{a:'a', b:'b', c:'c'}
本文标题:Extjs JSON编码解码
本文链接:https://www.haomeiwen.com/subject/ianbgftx.html
网友评论