Skip to content

Commit 941a2bb

Browse files
committed
Java:MultiDataSource 更新内置 APIAuto
1 parent 56131b5 commit 941a2bb

File tree

1 file changed

+6
-7
lines changed
  • APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/apijson

1 file changed

+6
-7
lines changed

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/apijson/JSONRequest.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,18 +255,17 @@ function log(tag, msg) {
255255
* @param s
256256
*/
257257
function parseJSON(s) {
258-
if (s instanceof Object) {
259-
alertOfDebug("parseJSON s instanceof JSON >> return s;");
260-
return s;
261-
}
262-
263258
if (typeof s != "string") {
264259
alertOfDebug("parseJSON typeof json != string >> s = \"\" + s;");
265-
s = "" + s;
260+
return s;
266261
}
267262
// alertOfDebug("parseJSON s = \n" + s);
268263

269-
return JSON.parse(s);
264+
try {
265+
return JSON.parse(s);
266+
} catch (e) {
267+
return JSON5.parse(s)
268+
}
270269
}
271270

272271
/**测试用的提示

0 commit comments

Comments
 (0)