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