isJsonDecodable method
Check if string is json decodable or not
Implementation
bool isJsonDecodable() {
if (isEmptyOrNull) return false;
try {
jsonDecode(this!) as Map<String, dynamic>;
// jsonDecode(this!);
// ignore: unused_catch_clause
} on FormatException catch (e) {
return false;
}
return true;
}