code: func ToParamWithVersion(version string, a Args) (string, error) {
  	if a.Len() == 0 {
  		return "", nil
  	}
  
  	if version != "" && versions.LessThan(version, "1.22") {
  		buf, err := json.Marshal(convertArgsToSlice(a.fields))
  		return string(buf), err
  	}
  
  	return ToJSON(a)
  }
docs: // ToParamWithVersion encodes Args as a JSON string. If version is less than 1.22
  // then the encoded format will use an older legacy format where the values are a
  // list of strings, instead of a set.
  //
  // Deprecated: Use ToJSON