code: func processGenJSONData(r io.Reader) (*isolate.ArchiveOptions, error) {
  	data := &struct {
  		Args    []string
  		Dir     string
  		Version int
  	}{}
  	if err := json.NewDecoder(r).Decode(data); err != nil {
  		return nil, fmt.Errorf("failed to decode: %s", err)
  	}
  
  	if data.Version != isolate.IsolatedGenJSONVersion {
  		return nil, fmt.Errorf("invalid version %d", data.Version)
  	}
  
  	if fileInfo, err := os.Stat(data.Dir); err != nil || !fileInfo.IsDir() {
  		return nil, fmt.Errorf("invalid dir %s", data.Dir)
  	}
  
  	opts, err := parseArchiveCMD(data.Args, data.Dir)
  	if err != nil {
  		return nil, fmt.Errorf("invalid archive command: %s", err)
  	}
  	return opts, nil
  }
docs: // processGenJSONData performs the function of processGenJSON, but operates on an io.Reader.