helper to convert an object to a key-value pair string NOTE: cannot go one-level deep for the object, use the POST method for that src: http://stackoverflow.com/questions/6566456/how-to-serialize-a-object-into-a-list-of-parameters
332169
function (obj) {
	
    var pairs = [];
    for (var prop in obj) {
        if (!obj.hasOwnProperty(prop)) {
            continue;
        }
        pairs.push(prop + '=' + obj[prop]);
    }
    return pairs.join('&');	
}
919709
def to_str(obj):
    
    if not isinstance(obj, str) and PY3 and isinstance(obj, bytes):
        obj = obj.decode('utf-8')
    return obj if isinstance(obj, string_types) else str(obj)
607778
function objectToString(o) {
  return '{' + keys(o).map(k => `${k}: ${o[k]}`).join(', ') + '}';
}
683232
function toQueryString(object) {
    return _.transform(object, (results, value, key) => {
        results.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
    }, []).join('&');
}
276519
public static final String serializeToString(final Object object) {
    if (object == null)
      throw new IllegalArgumentException("Object was null");
    try {
      return jsonMapper.writeValueAsString(object);
    } catch (JsonProcessingException e) {
      throw new JSONException(e);
    }
  }
160641
function(obj) {
			var result = {};
			var keys = this.toArray(arguments, 1);
			Object.keys(obj).forEach(function(key) {
				if (~keys.indexOf(key)) {
					result[key] = obj[key];
				}
			});
			return result;
		}
971628
function objectToQueryString(obj) {
        var str = [];
        for (var p in obj) {
            if (obj.hasOwnProperty(p)) {
                str.push(p + '=' + obj[p]);
            }
        }
        return str.join('&');
    }
1212936
def to_string(self, obj):
        
        try:
            converted = [str(element) for element in obj]
            string = ','.join(converted)
        except TypeError:
            # for now this is ok for booleans
            string = str(obj)
        return string
1086348
function (obj) {
    // sanity check
    if (!obj || typeof obj !== 'object') {
      return []
    }

    var results = []

    Object.keys(obj).forEach(function (name) {
      // nested values in query string
      if (typeof obj[name] === 'object') {
        obj[name].forEach(function (value) {
          results.push({
            name: name,
            value: value
          })
        })
        return
      }

      results.push({
        name: name,
        value: obj[name]
      })
    })

    return results
  }
1110012
function __serializeObject(data, options=DEFAULT_OPTIONS) {
	let dataBuffers = [];
	let allKeys = (options.sort_key === true) ? Object.keys(data).sort() : Object.keys(data);
	// ignore undefined value
	for (let key of allKeys) {
		let subData = data[key];
		if (subData === undefined) continue;

		let subType = __getType(subData, options);
		let subTypeBuffer = __serializeType(subType);
		let keyBuffers = __serializeShortString(key);
		let subDataBuffers = __serializeData(subType, subData, options);
		dataBuffers.push(subTypeBuffer, ...keyBuffers, ...subDataBuffers);
	}
	let length = __getLengthByArrayBuffers(dataBuffers);
	let lengthData = new Uint32Array([length]);
	return [lengthData.buffer, ...dataBuffers];
}
522519
function serializeObject(obj) {
  var seen = [];

  return JSON.stringify(obj, function(key, val) {
    val = toJsonReplacer(key, val);
    if (isObject(val)) {

      if (seen.indexOf(val) >= 0) return '...';

      seen.push(val);
    }
    return val;
  });
}
218197
function toKeyValueStrings(dynamoDBMap) {
  return dynamoDBMap && typeof dynamoDBMap === 'object' ?
    Object.getOwnPropertyNames(dynamoDBMap).map(key => `${key}:${stringify(toValueFromAttributeValue(dynamoDBMap[key]))}`) : [];
}
846223
def to_api_repr(self):
        
        values = self.values
        if self.array_type == "RECORD" or self.array_type == "STRUCT":
            reprs = [value.to_api_repr() for value in values]
            a_type = reprs[0]["parameterType"]
            a_values = [repr_["parameterValue"] for repr_ in reprs]
        else:
            a_type = {"type": self.array_type}
            converter = _SCALAR_VALUE_TO_JSON_PARAM.get(self.array_type)
            if converter is not None:
                values = [converter(value) for value in values]
            a_values = [{"value": value} for value in values]
        resource = {
            "parameterType": {"type": "ARRAY", "arrayType": a_type},
            "parameterValue": {"arrayValues": a_values},
        }
        if self.name is not None:
            resource["name"] = self.name
        return resource
406212
protected String keyToString(Object rawKey)
    {
        if (rawKey instanceof String) {
            return (String) rawKey;
        }
        return String.valueOf(rawKey);
    }
402608
function serialize(obj) {
    if (!isObject(obj)) return obj;
    var pairs = [];
    for (var key in obj) {
        if (null != obj[key]) {
            pairs.push(encodeURIComponent(key)
                + '=' + encodeURIComponent(obj[key]));
        }
    }
    return pairs.join('&');
}
1060822
def params_array(object)
      case object
      when Array then object
      when Hash then object.to_a
      when RequestProxy
        tmp = object.path.split('?')
        params = tmp[1] ? params_decode(tmp[1]) : []
        if object.post? && object.headers['Content-Type'].to_s.start_with?('application/x-www-form-urlencoded')
          params.concat params_decode(object.body)
        end
        params
      else
        raise "error: cannot convert #{object.class} object to params array"
      end
    end
1328340
function arrayToStr(key, value) {
  if (isString(value) || isNumber(value)) return `${key}=${value}`;
  if (isString(value[0])) return `${key}=${value.join(':')}`;
  if (value && value.toString) return `${key}=${value.toString()}`;

  return value.map(val => arrayToStr(key, val));
}