VulnerabilityReportVulnerabilityDetails.fromJson constructor

VulnerabilityReportVulnerabilityDetails.fromJson(
  1. Map _json
)

Implementation

VulnerabilityReportVulnerabilityDetails.fromJson(core.Map _json)
    : this(
        cve: _json.containsKey('cve') ? _json['cve'] as core.String : null,
        cvssV2Score: _json.containsKey('cvssV2Score')
            ? (_json['cvssV2Score'] as core.num).toDouble()
            : null,
        cvssV3: _json.containsKey('cvssV3')
            ? CVSSv3.fromJson(
                _json['cvssV3'] as core.Map<core.String, core.dynamic>)
            : null,
        description: _json.containsKey('description')
            ? _json['description'] as core.String
            : null,
        references: _json.containsKey('references')
            ? (_json['references'] as core.List)
                .map<VulnerabilityReportVulnerabilityDetailsReference>(
                    (value) =>
                        VulnerabilityReportVulnerabilityDetailsReference
                            .fromJson(
                                value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        severity: _json.containsKey('severity')
            ? _json['severity'] as core.String
            : null,
      );