Relation.fromJson constructor
Implementation
factory Relation.fromJson(Map<String, Object?> json) {
return Relation(
name: json[r'name'] as String? ?? '',
relationData: json[r'relationData'] != null
? RelationData.fromJson(
json[r'relationData']! as Map<String, Object?>)
: null,
source: json[r'source'],
target: json[r'target'],
expandable: json[r'_expandable'] != null
? RelationExpandable.fromJson(
json[r'_expandable']! as Map<String, Object?>)
: null,
links: GenericLinks.fromJson(
json[r'_links'] as Map<String, Object?>? ?? const {}),
);
}