tryJsonDecode static method
Returns value when it can be JSON-decoded, otherwise null.
Implementation
static dynamic tryJsonDecode(String? value) {
if (value == null) return null;
try {
return jsonDecode(value);
} catch (_) {
return null;
}
}