Stringifies an object without the chance for circular error

@param {Object} obj object to stringify
@memberOf object
@return {String} string form of the passed object
771844
function stringify(obj) {
    var cache = [];

    return JSON.stringify(obj, function (key, value) {
        if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value !== null) {
            if (cache.indexOf(value) !== -1) {
                return '[Circular]';
            }
            cache.push(value);
        }
        return value;
    });
}
670540
function stringify(object) {
    var seen = [];
    return JSON.stringify(object, function(key, val) {
        if (val !== null && typeof val === 'object') {
            if (seen.indexOf(val) >= 0) {
                return undefined;
            }
            seen.push(val);
        }
        return val;
    });
}
749105
function coercePrimitiveToObject(obj) {
  if (isPrimitive(obj)) {
    obj = Object(obj);
  }
  // istanbul ignore next
  if (NO_KEYS_IN_STRING_OBJECTS && isString(obj)) {
    forceStringCoercion(obj);
  }
  return obj;
}
618560
function(object) {
    if (!this.stringify) return JSON.stringify(object);

    return this.stringify(object, function(key, value) {
      return (this[key] instanceof Array) ? this[key] : value;
    });
  }
580822
public static Object arrayToString(final Object obj) {
        if (obj != null && obj.getClass().isArray()) {
            final int len = Array.getLength(obj);
            final String[] strings = new String[len];
            for (int i = 0; i < len; i++) {
                strings[i] = String.valueOf(Array.get(obj, i));
            }
            return Arrays.toString(strings);
        } else {
            return obj;
        }
    }
901592
public static String deepToString(final Object obj) {
        if (obj == null) {
            return NULL_STRING;
        }

        if (obj.getClass().isArray()) {
            return typeOf(obj.getClass()).deepToString(obj);
        }

        return obj.toString();
    }
336947
public static String convertObjectToString(Object obj)
    {
        try {
            ByteArrayOutputStream writer = new ByteArrayOutputStream();
            ObjectOutputStream outStream = new ObjectOutputStream(writer);
            outStream.writeObject(obj);
            outStream.flush();
            writer.flush();
            String string = writer.toString(Constant.OBJECT_ENCODING);//Constants.STRING_ENCODING);
            writer.close();
            outStream.close();
            return string;
        } catch (IOException ex)    {
            ex.printStackTrace();   // Never
        }
        return null;
    }
610389
public static String serialize(Object[] objs)
    {
        StringBuffer buff = new StringBuffer();
        for(int i = 0; i < objs.length; i++)
        {
            if(objs[i] != null)
            {
                buff.append(objs[i].toString());
                if(i != objs.length-1)
                    buff.append(",");
            }
        }
        return buff.toString();
    }
661415
function camelize(obj) {
        var _this = this;

        var _camelize = function _camelize(str) {
            str = stringHelpers.underscore(str);
            str = stringHelpers.slugifyText(str);

            return str.replace(/[_.-\s](\w|$)/g, function (_, x) {
                return x.toUpperCase();
            });
        };

        if (validateHelpers.isDate(obj) || validateHelpers.isRegExp(obj)) {
            return obj;
        }

        if (validateHelpers.isArray(obj)) {
            return obj.map(function (item, index) {
                if (validateHelpers.isObject(item)) {
                    return _this.camelize(item);
                }

                return item;
            });
        }

        if (validateHelpers.isString(obj)) {
            return _camelize(obj);
        }

        return Object.keys(obj).reduce(function (acc, key) {
            var camel = _camelize(key);
            acc[camel] = obj[key];

            if (validateHelpers.isObject(obj[key])) {
                acc[camel] = _this.camelize(obj[key]);
            }

            return acc;
        }, {});
    }
1158559
function stringify (obj, replacer, spacer) {
  decirc(obj, '', [], undefined)
  var res = JSON.stringify(obj, replacer, spacer)
  while (arr.length !== 0) {
    var part = arr.pop()
    part[0][part[1]] = part[2]
  }
  return res
}
478701
function toLower(obj) {
    const newObj = {};
    _.keys(obj).forEach((key) => {
        const type = typeof (newObj[key.toLowerCase()] = obj[key]);
        if (type === 'object') {
            newObj[key] = toLower(newObj[key]);
        }
    });
    return newObj;
}
890564
function tryStringify(i) {
    try {
        i = J.stringifyAll(i, 2);
    }
    catch(e) {
        i = J.stringify({
            error: 'object contains cycles and cannot be sent.'
        });
    }
    return i;
}
1245773
function objectToLowercase(obj) {
  var result = {};
  for (var key in obj) {
    if (obj.hasOwnProperty(key)) {
      result[key.toLowerCase()] = obj[key];
    }
  }
  return result;
}
168961
function (obj) {
  var ret = {};

  if( Object.prototype.toString.call(obj) === '[object Object]' ) {
    for (var key in obj) {
      ret[key] = arrayClean(obj[key]);
    }
  }
  else if( Object.prototype.toString.call(obj) === '[object Array]' ) {
    if (obj.length === 1) {
      ret = arrayClean(obj[0]);
    }
    else {
      ret = new Array;
      for(var i=0;i<obj.length;i++) {
        ret.push(arrayClean(obj[i]));
      }
    }
  }
  else {
    ret = obj;
  }
  return ret;
}
1004696
function objectToQueryString (obj) {
    let qs = reduce(obj, (result, value, key) => {
        if (!isNull(value) && !isUndefined(value)) {
            if (isArray(value)) {
                result += reduce(value, (result1, value1) => {
                    if (!isNull(value1) && !isUndefined(value1)) {
                        result1 += key + '=' + value1 + '&';
                        return result1
                    } else {
                        return result1;
                    }
                }, '')
            } else {
                result += key + '=' + value + '&';
            }
            return result;
        } else {
            return result
        }
    }, '').slice(0, -1);
    return qs;
}
355114
public String objectToString(Object obj)
    {
        String string = super.objectToString(obj);
        string = Base64.encode(string);
        return string;
    }
245822
function tryCatchStringify(obj) {
  try {
    return JSON.stringify(obj);
  } catch (err) {
    /* eslint-disable no-console */
    if (process.env.NODE_ENV !== 'production')
      console.log('Failed to stringify', err);
     no-console */
    return jsan.stringify(obj, null, null, { circular: '[CIRCULAR]' });
  }
}