toJson method
Implementation
@override
Object toJson() => {
if (name.isNotDefault) 'name': name,
if (granteeType != null) 'granteeType': granteeType!.toJson(),
if (emailAddress != null) 'emailAddress': emailAddress,
if (role != null) 'role': role!.toJson(),
};