检查字符串是否为有效的 JSON
字符串
isJSON('{"name":"leo", "age":20}'); /// trueisJSON('{"name":"leo", age:"20"}'); /// falseisJSON(null); /// true Copy
isJSON('{"name":"leo", "age":20}'); /// trueisJSON('{"name":"leo", age:"20"}'); /// falseisJSON(null); /// true
检查字符串是否为有效的 JSON