PackageData.fromJson constructor
PackageData.fromJson(
- Map json_
Implementation
PackageData.fromJson(core.Map json_)
: this(
architecture: json_.containsKey('architecture')
? json_['architecture'] as core.String
: null,
binarySourceInfo: json_.containsKey('binarySourceInfo')
? (json_['binarySourceInfo'] as core.List)
.map((value) => BinarySourceInfo.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
binaryVersion: json_.containsKey('binaryVersion')
? PackageVersion.fromJson(
json_['binaryVersion'] as core.Map<core.String, core.dynamic>)
: null,
cpeUri: json_.containsKey('cpeUri')
? json_['cpeUri'] as core.String
: null,
dependencyChain: json_.containsKey('dependencyChain')
? (json_['dependencyChain'] as core.List)
.map((value) => LanguagePackageDependency.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
fileLocation: json_.containsKey('fileLocation')
? (json_['fileLocation'] as core.List)
.map((value) => FileLocation.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
hashDigest: json_.containsKey('hashDigest')
? json_['hashDigest'] as core.String
: null,
licenses: json_.containsKey('licenses')
? (json_['licenses'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
maintainer: json_.containsKey('maintainer')
? Maintainer.fromJson(
json_['maintainer'] as core.Map<core.String, core.dynamic>)
: null,
os: json_.containsKey('os') ? json_['os'] as core.String : null,
osVersion: json_.containsKey('osVersion')
? json_['osVersion'] as core.String
: null,
package: json_.containsKey('package')
? json_['package'] as core.String
: null,
packageType: json_.containsKey('packageType')
? json_['packageType'] as core.String
: null,
patchedCve: json_.containsKey('patchedCve')
? (json_['patchedCve'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
sourceVersion: json_.containsKey('sourceVersion')
? PackageVersion.fromJson(
json_['sourceVersion'] as core.Map<core.String, core.dynamic>)
: null,
unused: json_.containsKey('unused')
? json_['unused'] as core.String
: null,
version: json_.containsKey('version')
? json_['version'] as core.String
: null,
);