MCPcopy Create free account
hub / github.com/Semporia/Scripts / jsonParse

Function jsonParse

jd_try.js:502–512  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

500}
501
502function jsonParse(str) {
503 if (typeof str == "string") {
504 try {
505 return JSON.parse(str);
506 } catch (e) {
507 console.log(e);
508 $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
509 return [];
510 }
511 }
512}
513
514// 来自 @chavyleung 大佬
515// https://raw.githubusercontent.com/chavyleung/scripts/master/Env.js

Callers 1

requireConfigFunction · 0.70

Calls 2

logMethod · 0.45
msgMethod · 0.45

Tested by

no test coverage detected