isJson property
bool
get
isJson
Check if the string is valid JSON
Implementation
bool get isJson {
try {
json.decode(this);
} catch (e) {
return false;
}
return true;
}
Check if the string is valid JSON
bool get isJson {
try {
json.decode(this);
} catch (e) {
return false;
}
return true;
}