Source.fromJson constructor

Source.fromJson(
  1. Map _json
)

Implementation

Source.fromJson(core.Map _json)
    : this(
        additionalContexts: _json.containsKey('additionalContexts')
            ? (_json['additionalContexts'] as core.List)
                .map((value) => SourceContext.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        artifactStorageSourceUri:
            _json.containsKey('artifactStorageSourceUri')
                ? _json['artifactStorageSourceUri'] as core.String
                : null,
        context: _json.containsKey('context')
            ? SourceContext.fromJson(
                _json['context'] as core.Map<core.String, core.dynamic>)
            : null,
        fileHashes: _json.containsKey('fileHashes')
            ? (_json['fileHashes'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, item) => core.MapEntry(
                  key,
                  FileHashes.fromJson(
                      item as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
      );