fromJson method
Implementation
@override
UGetRelationshipsRelationship fromJson(Map<String, dynamic> json) {
try {
if (isRelationship(json)) {
return UGetRelationshipsRelationship.relationship(
data: const RelationshipConverter().fromJson(json),
);
}
if (isNotFoundActor(json)) {
return UGetRelationshipsRelationship.notFoundActor(
data: const NotFoundActorConverter().fromJson(json),
);
}
return UGetRelationshipsRelationship.unknown(data: json);
} catch (_) {
return UGetRelationshipsRelationship.unknown(data: json);
}
}