toJson method

  1. @override
Map<String, dynamic> toJson()
override

Serializes the role into its standard JSON representation.

Example:

final json = role.toJson();
print(json['name']);

Implementation

@override
Map<String, dynamic> toJson() {
  return { 'name': name, 'description': description};
}