Formatter for debugging purposes only.
@param obj to print
@return String
777524
private static String formatLogParam(Clob obj) {
		String result="";
		try {
			result= "(cblob of length "+obj.length()+")";
		} catch (SQLException e) {
			result = "(cblob of unknown length)";
		}
		return result;
	}
716426
def fprint(self, obj, stream=None, **kwargs):
        """"""
        if stream is None:
            stream = sys.stdout

        options = self.options
        options.update(kwargs)

        if isinstance(obj, dimod.SampleSet):
            self._print_sampleset(obj, stream, **options)
            return

        raise TypeError("cannot format type {}".format(type(obj)))
574057
public <T> ObjectFormatter<? super T> getObjectFormatter(T object) {
    if (objectFormatters == null) {
      return null;
    }

    Class<? super T> clazz;
    Class<? super T> superClazz = (Class<? super T>) object.getClass();
    ObjectFormatter<? super T> formatter;
    do {
      clazz = superClazz;
      formatter = (ObjectFormatter<? super T>) objectFormatters.get(clazz);
      superClazz = clazz.getSuperclass();
    } while (formatter == null && superClazz != null);
    return formatter;
  }
1101327
function (obj) {
  printHelpOnExit = false;
  if (_.isError(obj)) {
    console.error(obj);
  } else {
    console.error(`ERROR: ${obj.toString()}`);
  }
  if (theUfo) theUfo.disconnect();
  process.exitCode = 1;
}
987600
public static String serialize(final Object obj) throws IOException {
		final ObjectMapper mapper = new ObjectMapper();
        mapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS);
		return mapper.writeValueAsString(obj);
		
	}
318211
public function debugObject($obj, $indent = 0)
    {
        if (is_array($obj)) {
            $return = '';
            foreach ($obj as $k => $v) {
                $return .= str_repeat('&nbsp;', $indent);
                if (is_array($v)) {
                    $return .= $k . "->Array\n";
                    $return .= $this->debugObject($v, $indent + 1);
                } else {
                    $return .= $k . "->$v\n";
                }
            }
            return $return;
        }
    }
11899
public function renderBeforeStep($obj)
    {
        $print = array();
        foreach ($this->rendererList as $name => $renderer) {
            $print[$name] = $renderer->renderBeforeStep($obj);
        }

        return $print;
    }
943092
function format (obj, sub) {
    var x = utils.clone(obj);
    if (x) {
        if ('Binary' === x.constructor.name) {
            x = '[object Buffer]';
        } else if ('ObjectID' === x.constructor.name) {
            var representation = 'ObjectId("' + x.toHexString() + '")';
            x = { inspect: function() { return representation; } };
        } else if ('Date' === x.constructor.name) {
            var representation = 'new Date("' + x.toUTCString() + '")';
            x = { inspect: function() { return representation; } };
        } else if ('Object' === x.constructor.name) {
            var keys = Object.keys(x)
                , i = keys.length
                , key
            while (i--) {
                key = keys[i];
                if (x[key]) {
                    if ('Binary' === x[key].constructor.name) {
                        x[key] = '[object Buffer]';
                    } else if ('Object' === x[key].constructor.name) {
                        x[key] = format(x[key], true);
                    } else if ('ObjectID' === x[key].constructor.name) {
                        ;(function(x){
                            var representation = 'ObjectId("' + x[key].toHexString() + '")';
                            x[key] = { inspect: function() { return representation; } };
                        })(x)
                    } else if ('Date' === x[key].constructor.name) {
                        ;(function(x){
                            var representation = 'new Date("' + x[key].toUTCString() + '")';
                            x[key] = { inspect: function() { return representation; } };
                        })(x)
                    } else if (Array.isArray(x[key])) {
                        x[key] = x[key].map(function (o) {
                            return format(o, true)
                        });
                    }
                }
            }
        }
        if (sub) return x;
    }

    return require('util')
        .inspect(x, false, 10, true)
        .replace(/\n/g, '')
        .replace(/\s{2,}/g, ' ')
}
333474
function formatOutput(obj) {
	if (argv.m) {
		return JSON.stringify(obj);
	}
	return JSON.stringify(obj, null, 2);
}
855918
function prettyPrintJson(obj, indent) {
  var result = '';

  if (indent == null) indent = '';

  for (var property in obj) {
    if (property.charAt(0) !== '_') {
      var value = obj[property];

      if (typeof value === 'string') {
        value = '\'' + value + '\'';
      } else if (typeof value === 'object') {
        if (value instanceof Array) {
          value = '[ ' + value + ' ]';
        } else {
          // Recursive dump
          var od = prettyPrintJson(value, indent + '  ');

          value = '{\n' + od + '\n' + indent + '}';
        }
      }
      result += indent + property + ': ' + value + ',\n';
    }
  }
  return result.replace(/,\n$/, '');
}
332681
function (className, msg, msgText, o) {
                if (console.debug) {
                    console.debug(this._formatClassName(className) + msg);
                } else if (console.log) {
                    console.log(this._formatClassName(className) + msg);
                }
                this._inspectObject(o);
            }
113337
public static function pr($obj) {

    if (!self::is_cli())
      echo '<pre style="word-wrap: break-word">';
    if ( is_object($obj) )
      print_r($obj);
    elseif ( is_array($obj) )
      print_r($obj);
    else
      echo $obj;
    if (!self::is_cli())
      echo '</pre>';
  }
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;
    }
209326
public static void print(final Object obj)
	{
		System.out.println(getInstance(obj.getClass()).serialise(obj));
	}
506455
public final void print(Object obj) throws Exception {
        if ((mOutputOverridePermitted || mBuffer == null) 
            && mOutputReceiver != null) { 
            mOutputReceiver.print(obj);
        }
        else if (mBuffer != null) {
            mBuffer.append(toString(obj));
        }
    }
249066
function format(obj) {
  var parameters = obj.parameters
  var type = obj.type

  if (!type || typeof type !== 'string' || !tokenRegExp.test(type)) {
    throw new TypeError('invalid type')
  }

  // start with normalized type
  var string = String(type).toLowerCase()

  // append parameters
  if (parameters && typeof parameters === 'object') {
    var param
    var params = Object.keys(parameters).sort()

    for (var i = 0; i < params.length; i++) {
      param = params[i]

      var val = param.substr(-1) === '*'
        ? ustring(parameters[param])
        : qstring(parameters[param])

      string += '; ' + param + '=' + val
    }
  }

  return string
}
1107299
public static String serialize(Object obj) throws SerializationException {
		try {
			if (obj != null) {
				return mapper.writeValueAsString(obj);
			} else {
				return null;
			}
		} catch (Exception e) {
			logger.error("SerializationException {}", e.getMessage());
			throw new SerializationException(e.getMessage());
		}
	}