The package offers a JSON utility for all model classes.
Map<String, dynamic> toJson() { return { 'name': name, 'avatar': avatar, }; }