toJson method
Converts the object to a JSON representation.
Implementation
@override
Map<dynamic, dynamic> toJson() {
return {
"votes": {
for (final i in votes.entries)
i.key.toJson(): {
for (final e in i.value.entries) e.key.toJson(): e.value.toJson()
}
}
};
}