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