fromJson method
Implementation
@override
UModerationCreateReportSubject fromJson(Map<String, dynamic> json) {
try {
if (RepoRef.validate(json)) {
return UModerationCreateReportSubject.repoRef(
data: const RepoRefConverter().fromJson(json),
);
}
if (RepoStrongRef.validate(json)) {
return UModerationCreateReportSubject.repoStrongRef(
data: const RepoStrongRefConverter().fromJson(json),
);
}
return UModerationCreateReportSubject.unknown(data: json);
} catch (_) {
return UModerationCreateReportSubject.unknown(data: json);
}
}