PackageOccurrence.fromJson constructor

PackageOccurrence.fromJson(
  1. Map json_
)

Implementation

PackageOccurrence.fromJson(core.Map json_)
    : this(
        architecture: json_.containsKey('architecture')
            ? json_['architecture'] as core.String
            : null,
        cpeUri: json_.containsKey('cpeUri')
            ? json_['cpeUri'] as core.String
            : null,
        license: json_.containsKey('license')
            ? License.fromJson(
                json_['license'] as core.Map<core.String, core.dynamic>)
            : null,
        location: json_.containsKey('location')
            ? (json_['location'] as core.List)
                .map((value) => Location.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        packageType: json_.containsKey('packageType')
            ? json_['packageType'] as core.String
            : null,
        version: json_.containsKey('version')
            ? Version.fromJson(
                json_['version'] as core.Map<core.String, core.dynamic>)
            : null,
      );