ExecutionDeleteContextParams.fromJson constructor

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

Implementation

factory ExecutionDeleteContextParams.fromJson(
    JsonDecoder jsonDecoder, String jsonPath, Object? json) {
  json ??= {};
  if (json is Map) {
    String id;
    if (json.containsKey('id')) {
      id = jsonDecoder.decodeString('$jsonPath.id', json['id']);
    } else {
      throw jsonDecoder.mismatch(jsonPath, 'id');
    }
    return ExecutionDeleteContextParams(id);
  } else {
    throw jsonDecoder.mismatch(
        jsonPath, 'execution.deleteContext params', json);
  }
}