JS对象序列化成json数据和json数据转化为JS对象的代码 JS对象序列化成json数据:functionSerialize(obj){switch(obj.constructor){caseObject:varstr="{";for(varoinobj){str 对象序列化