private static void writeNumber(final StringWriter writer, final Number object) {
		if(object instanceof Byte
				|| object instanceof Short
				|| object instanceof Integer
				|| object instanceof Long
				|| object instanceof Float
				|| object instanceof Double
				|| object instanceof BigInteger
				|| object instanceof BigDecimal) {
			writer.write(String.valueOf(object));
			return;
		}
		double doubleValue = object.doubleValue();
		if(Math.floor(doubleValue) == doubleValue) {
			writer.write(String.valueOf(object.longValue()));
			return;
		}
		writer.write(String.valueOf(doubleValue));
	}