VulnerabilityOccurrence.fromJson constructor

VulnerabilityOccurrence.fromJson(
  1. Map _json
)

Implementation

VulnerabilityOccurrence.fromJson(core.Map _json)
    : this(
        cvssScore: _json.containsKey('cvssScore')
            ? (_json['cvssScore'] as core.num).toDouble()
            : null,
        effectiveSeverity: _json.containsKey('effectiveSeverity')
            ? _json['effectiveSeverity'] as core.String
            : null,
        fixAvailable: _json.containsKey('fixAvailable')
            ? _json['fixAvailable'] as core.bool
            : null,
        longDescription: _json.containsKey('longDescription')
            ? _json['longDescription'] as core.String
            : null,
        packageIssue: _json.containsKey('packageIssue')
            ? (_json['packageIssue'] as core.List)
                .map((value) => PackageIssue.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        relatedUrls: _json.containsKey('relatedUrls')
            ? (_json['relatedUrls'] as core.List)
                .map((value) => RelatedUrl.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        severity: _json.containsKey('severity')
            ? _json['severity'] as core.String
            : null,
        shortDescription: _json.containsKey('shortDescription')
            ? _json['shortDescription'] as core.String
            : null,
        type: _json.containsKey('type') ? _json['type'] as core.String : null,
      );