tryJsonDecode static method
Attempts to decode a JSON string to a Map.
Implementation
static Map<String, dynamic>? tryJsonDecode(String? value, {bool cleanInput = false}) {
if (value == null || value.isEmpty) return null;
if (cleanInput) {
final String? cleaned = cleanJsonResponse(value);
if (cleaned == null || cleaned.isEmpty) return null;
return jsonDecodeToMap(cleaned);
}
return jsonDecodeToMap(value);
}