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