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