canParse static method

bool canParse(
  1. Object? obj
)
override

Implementation

static bool canParse(Object? obj) {
  if (obj is! Map<String, dynamic>) {
    return false;
  }
  if ((obj['args'] is! List ||
      (obj['args'].any((item) => item is! String)))) {
    return false;
  }
  if (obj['argsCanBeInterpretedByShell'] is! bool?) {
    return false;
  }
  if (obj['cwd'] is! String) {
    return false;
  }
  if (obj['env'] is! Map<String, Object?>?) {
    return false;
  }
  if (obj['kind'] is! String?) {
    return false;
  }
  if (obj['title'] is! String?) {
    return false;
  }
  return RequestArguments.canParse(obj);
}