摘要: 后端开发者偶尔写写前端页面,记录的笔记,大佬勿喷。 判断是否为JSON 直接给出源码: const isJson = (str: any) => { try { if (typeof JSON.parse(str) == "object") { return true; } } catch (e) 阅读全文
posted @ 2022-04-12 09:52 johnny233 阅读(25) 评论(0) 推荐(0) 编辑