Vulnerability.fromJson constructor

Vulnerability.fromJson(
  1. Map _json
)

Implementation

Vulnerability.fromJson(core.Map _json)
    : this(
        cvssScore: _json.containsKey('cvssScore')
            ? (_json['cvssScore'] as core.num).toDouble()
            : null,
        cvssV3: _json.containsKey('cvssV3')
            ? CVSSv3.fromJson(
                _json['cvssV3'] as core.Map<core.String, core.dynamic>)
            : null,
        details: _json.containsKey('details')
            ? (_json['details'] as core.List)
                .map<Detail>((value) => Detail.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        severity: _json.containsKey('severity')
            ? _json['severity'] as core.String
            : null,
        sourceUpdateTime: _json.containsKey('sourceUpdateTime')
            ? _json['sourceUpdateTime'] as core.String
            : null,
        windowsDetails: _json.containsKey('windowsDetails')
            ? (_json['windowsDetails'] as core.List)
                .map<WindowsDetail>((value) => WindowsDetail.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );