Entity.fromJson constructor
Entity.fromJson(
- Map json_
Implementation
Entity.fromJson(core.Map json_)
: this(
mentions: json_.containsKey('mentions')
? (json_['mentions'] as core.List)
.map((value) => EntityMention.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
metadata: json_.containsKey('metadata')
? (json_['metadata'] as core.Map<core.String, core.dynamic>).map(
(key, value) => core.MapEntry(
key,
value as core.String,
),
)
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
salience: json_.containsKey('salience')
? (json_['salience'] as core.num).toDouble()
: null,
sentiment: json_.containsKey('sentiment')
? Sentiment.fromJson(
json_['sentiment'] as core.Map<core.String, core.dynamic>)
: null,
type: json_.containsKey('type') ? json_['type'] as core.String : null,
);