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