ThreatInfo.fromJson constructor

ThreatInfo.fromJson(
  1. Map _json
)

Implementation

ThreatInfo.fromJson(core.Map _json) {
  if (_json.containsKey("platformTypes")) {
    platformTypes = (_json["platformTypes"] as core.List).cast<core.String>();
  }
  if (_json.containsKey("threatEntries")) {
    threatEntries = (_json["threatEntries"] as core.List)
        .map<ThreatEntry>((value) => new ThreatEntry.fromJson(value))
        .toList();
  }
  if (_json.containsKey("threatEntryTypes")) {
    threatEntryTypes =
        (_json["threatEntryTypes"] as core.List).cast<core.String>();
  }
  if (_json.containsKey("threatTypes")) {
    threatTypes = (_json["threatTypes"] as core.List).cast<core.String>();
  }
}