总结的判断是不是json字符串
export function isJSON(str: string) {
if (typeof str == 'string') {
try {
JSON.parse(str)
return true
} catch (e) {
return false
}
} else {
return false
}
}