fromJson static method

Permission fromJson(
  1. dynamic value
)

Returns a new Permission instance and imports

Implementation

// ignore: prefer_constructors_over_static_methods
static Permission fromJson(dynamic value) {
  final json = value.cast<String, dynamic>();
  return Permission(
    action: PermissionActionEnum.fromJson(json[r'action']),
    resource: json[r'resource'] == null
        ? null
        : Resource.fromJson(json[r'resource']),
  );
}