toJson method
Converts a Taint instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempEffect = effect;
final tempKey = key;
final tempTimeAdded = timeAdded;
final tempValue = value;
jsonData['effect'] = tempEffect;
jsonData['key'] = tempKey;
if (tempTimeAdded != null) {
jsonData['timeAdded'] = tempTimeAdded;
}
if (tempValue != null) {
jsonData['value'] = tempValue;
}
return jsonData;
}