public function modify(Closure $modify) {
    $contents = $this->jsonc->parseFile($this->file);
    
    $modifiedContents = $modify($contents);

    if ($modifiedContents !== NULL) {
      $contents = $modifiedContents;
    }

    $this->file->writeContents(
      $this->jsonc->stringify($contents, JSONConverter::PRETTY_PRINT)
    );
  }