Principal.fromJson constructor
Implementation
factory Principal.fromJson(Map<String, dynamic> json) {
return Principal(
id: json['Id'] as String?,
roles: (json['Roles'] as List?)
?.whereNotNull()
.map((e) => PermissionInfo.fromJson(e as Map<String, dynamic>))
.toList(),
type: (json['Type'] as String?)?.toPrincipalType(),
);
}