core.Map<core.String, core.dynamic> toJson() => { if (memberships != null) 'memberships': memberships!, };