toJson method
Implementation
Map<String, dynamic> toJson() {
return {
if (parent != null) 'parent': parent!.map((a) => a.toJson()).toList(),
if (grouping != null)
'grouping': grouping!.map((a) => a.toJson()).toList(),
if (category != null)
'category': category!.map((a) => a.toJson()).toList(),
if (other != null) 'other': other!.map((a) => a.toJson()).toList(),
};
}