ExecutionMapUriResult.fromJson constructor

ExecutionMapUriResult.fromJson(
  1. JsonDecoder jsonDecoder,
  2. String jsonPath,
  3. Object? json
)

Implementation

factory ExecutionMapUriResult.fromJson(
    JsonDecoder jsonDecoder, String jsonPath, Object? json) {
  json ??= {};
  if (json is Map) {
    String? file;
    if (json.containsKey('file')) {
      file = jsonDecoder.decodeString('$jsonPath.file', json['file']);
    }
    String? uri;
    if (json.containsKey('uri')) {
      uri = jsonDecoder.decodeString('$jsonPath.uri', json['uri']);
    }
    return ExecutionMapUriResult(file: file, uri: uri);
  } else {
    throw jsonDecoder.mismatch(jsonPath, 'execution.mapUri result', json);
  }
}