toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'name': name,
'description': description,
'fields': fields.map((e) => e.toJson()).toList(),
'methods': methods.map((e) => e.toJson()).toList(),
};
}