fromJson static method
Returns a new IAuthorization instance and imports its values from
value
if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static IAuthorization? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return IAuthorization(
isExpired: mapValueOfType<bool>(json, r'isExpired'),
userId: mapValueOfType<String>(json, r'userId'),
role: mapValueOfType<String>(json, r'role'),
expirationDate: mapDateTime(json, r'expirationDate', ''),
);
}
return null;
}