public static String formatJsonValue(Object fieldValue, String type) {
		NumberFormat nf = createFixedPointFormat();
		// These strings have been interned so == works for comparison
		if ("string" == type) {
			if (fieldValue instanceof Text) {
				return AnalysisUtility.escapeAndQuoteField(((Text) fieldValue).getValue());
			}
			
			return AnalysisUtility.escapeAndQuoteField("" + fieldValue);
		}
		if ("float" == type) {
			return nf.format(fieldValue);
		}
		if ("integer" == type) {
			if (fieldValue instanceof Date) {
				return "" + ((Date) fieldValue).getTime();
			}
		}
		
		return "" + fieldValue;
	}