PersonRelationship.fromJson constructor
PersonRelationship.fromJson(
- Object? json
Implementation
factory PersonRelationship.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return PersonRelationship(
director: map['director'] == null ? null : (map['director'] as bool),
executive: map['executive'] == null ? null : (map['executive'] as bool),
legalGuardian: map['legal_guardian'] == null
? null
: (map['legal_guardian'] as bool),
owner: map['owner'] == null ? null : (map['owner'] as bool),
percentOwnership: map['percent_ownership'] == null
? null
: (map['percent_ownership'] as num).toDouble(),
representative: map['representative'] == null
? null
: (map['representative'] as bool),
title: map['title'] == null ? null : (map['title'] as String),
);
}