Attribute.fromJson constructor
Attribute.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Attribute.fromJson(Map<String, dynamic> json) {
return Attribute(
beginOffset: json['BeginOffset'] as int?,
category: (json['Category'] as String?)?.toEntityType(),
endOffset: json['EndOffset'] as int?,
id: json['Id'] as int?,
relationshipScore: json['RelationshipScore'] as double?,
relationshipType:
(json['RelationshipType'] as String?)?.toRelationshipType(),
score: json['Score'] as double?,
text: json['Text'] as String?,
traits: (json['Traits'] as List?)
?.whereNotNull()
.map((e) => Trait.fromJson(e as Map<String, dynamic>))
.toList(),
type: (json['Type'] as String?)?.toEntitySubType(),
);
}