CVSSv3.fromJson constructor

CVSSv3.fromJson(
  1. Map _json
)

Implementation

CVSSv3.fromJson(core.Map _json)
    : this(
        attackComplexity: _json.containsKey('attackComplexity')
            ? _json['attackComplexity'] as core.String
            : null,
        attackVector: _json.containsKey('attackVector')
            ? _json['attackVector'] as core.String
            : null,
        availabilityImpact: _json.containsKey('availabilityImpact')
            ? _json['availabilityImpact'] as core.String
            : null,
        baseScore: _json.containsKey('baseScore')
            ? (_json['baseScore'] as core.num).toDouble()
            : null,
        confidentialityImpact: _json.containsKey('confidentialityImpact')
            ? _json['confidentialityImpact'] as core.String
            : null,
        exploitabilityScore: _json.containsKey('exploitabilityScore')
            ? (_json['exploitabilityScore'] as core.num).toDouble()
            : null,
        impactScore: _json.containsKey('impactScore')
            ? (_json['impactScore'] as core.num).toDouble()
            : null,
        integrityImpact: _json.containsKey('integrityImpact')
            ? _json['integrityImpact'] as core.String
            : null,
        privilegesRequired: _json.containsKey('privilegesRequired')
            ? _json['privilegesRequired'] as core.String
            : null,
        scope:
            _json.containsKey('scope') ? _json['scope'] as core.String : null,
        userInteraction: _json.containsKey('userInteraction')
            ? _json['userInteraction'] as core.String
            : null,
      );