toJson method
Implementation
Map<String, dynamic> toJson() {
List<Map<String, dynamic>> localCandidates = [];
for (var candidate in candidates) {
localCandidates.add(candidate.toJson());
}
return {'candidates': candidates, 'promptFeedback': promptFeedback};
}