src/org/ohmage/request/observer/StreamReadRequest.java
private static void handleGeneric(
			final JsonGenerator generator,
			final JsonNode generic,
			final ColumnNode<String> columns,
			final String fieldName)
			throws JsonGenerationException, IOException {
		
		// If it's an array, then process it as such.
		if(generic.isArray()) {
			handleArray(
				generator,
				(ArrayNode) generic,
				columns,
				fieldName);
		}
		// If it's an object, then process it as such.
		else if(generic.isObject()) {
			handleObject(
				generator,
				(ObjectNode) generic, 
				columns,
				fieldName);
		}
		// Otherwise, it can be added to its encapsulating object.
		else {
			if(fieldName == null) {
				generator.writeObject(generic);
			}
			else {
				generator.writeObjectField(fieldName, generic);
			}
		}
	}
/**
	 * Feeds a generic object into an output stream and only includes the
	 * specified columns.
	 * 
	 * @param generator The output stream to feed the object into.
	 * 
	 * @param encoder The encoder to convert Avro data to JSON data.
	 * 
	 * @param generic The object to be fed out.
	 * 
	 * @param columns The columns to restrict the output. If this is null, all
	 *				  data in the object will be output.
	 *
	 * @throws JsonGenerationException Could not serialize the data into JSON.
	 * 
	 * @throws IOException Could not write to the output stream.
	 */
Feeds a generic object into an output stream and only includes the
specified columns.

@param generator The output stream to feed the object into.

@param encoder The encoder to convert Avro data to JSON data.

@param generic The object to be fed out.

@param columns The columns to restrict the output. If this is null, all
data in the object will be output.

@throws JsonGenerationException Could not serialize the data into JSON.

@throws IOException Could not write to the output stream.
Feeds a generic object into an output stream and only includes the specified columns . @param generator The output stream to feed the object into . @param encoder The encoder to convert Avro data to JSON data . @param generic The object to be fed out . @param columns The columns to restrict the output . If this is null all data in the object will be output . @throws JsonGenerationException Could not serialize the data into JSON . @throws IOException Could not write to the output stream .
private static void handleGeneric(
			final JsonGenerator generator,
			final JsonNode generic,
			final ColumnNode<String> columns,
			final String fieldName)
			throws JsonGenerationException, IOException {
		if(generic.isArray()) {
			handleArray(
				generator,
				(ArrayNode) generic,
				columns,
				fieldName);
		}
		else if(generic.isObject()) {
			handleObject(
				generator,
				(ObjectNode) generic, 
				columns,
				fieldName);
		}
		else {
			if(fieldName == null) {
				generator.writeObject(generic);
			}
			else {
				generator.writeObjectField(fieldName, generic);
			}
		}
	}
private static void handleGeneric ( final JsonGenerator generator , final JsonNode generic , final ColumnNode < String > columns , final String fieldName ) throws JsonGenerationException , IOException { if ( generic . isArray ( ) ) { handleArray ( generator , ( ArrayNode ) generic , columns , fieldName ) ; } else if ( generic . isObject ( ) ) { handleObject ( generator , ( ObjectNode ) generic , columns , fieldName ) ; } else { if ( fieldName == null ) { generator . writeObject ( generic ) ; } else { generator . writeObjectField ( fieldName , generic ) ; } } }
Feeds a generic object into an output stream and only includes the
 specified columns.
Feeds a generic object into an output stream and only includes the specified columns .
// If it's an array, then process it as such. // If it's an object, then process it as such. // Otherwise, it can be added to its encapsulating object.