代码拉取完成,页面将自动刷新
const FastJSON = (function () {
let at;
this.format = function (str) {
let obj = JSON.parse(str);
at = obj;
obj = checkArgs(obj);
return obj;
};
let isObject = function (obj) {
return "object" == typeof obj
&& "[object object]" == Object.prototype.toString.call(obj)
.toLowerCase();
};
let checkArgs = function (obj) {
for (let para in obj) {
if (para == "_super_GXFastJSON") continue;
let pobj = obj[para];
pobj._super_GXFastJSON = obj;
if (isObject(pobj)) {
if (pobj.$ref) {
let g = pobj.$ref;
let p;
let b = false;
let first = g.substring(0, 1);
switch (first) {
case '@':
p = at;
break;
case '$':
let ss = g.split(".");
p = at;
for (let i = 1; i < ss.length; i++) {
p = p[ss[i]];
}
break;
case '.':
p = pobj;
for (let i = 0; i < g.length; i++) {
p = p._super_GXFastJSON;
}
break;
}
obj[para] = p;
} else {
let r = checkArgs(pobj);
}
}
delete pobj._super_GXFastJSON;
}
return obj;
}
});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。