isJSON static method
Check if the string is valid JSON
Implementation
static bool isJSON(str) {
try {
jsonDecode(str);
} catch (e) {
return false;
}
return true;
}
Check if the string is valid JSON
static bool isJSON(str) {
try {
jsonDecode(str);
} catch (e) {
return false;
}
return true;
}