toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
if (candidates != null) {
data['candidates'] = candidates!.map((v) => v.toJson()).toList();
}
if (promptFeedback != null) {
data['promptFeedback'] = promptFeedback!.toJson();
}
return data;
}