src/org/ohmage/domain/Annotation.java
public JSONObject toJson() {
		try {
			JSONObject result = new JSONObject();
			
			result.put(JSON_KEY_ID, id);
			result.put(JSON_KEY_TEXT, text);
			result.put(JSON_KEY_TIME, epochMillis);
			result.put(JSON_KEY_TIMEZONE, timezone.getID());
			result.put(JSON_KEY_AUTHOR, author);
			
			return result;
		}
		catch(JSONException e) {
			LOGGER.error("Error building the JSONObject.", e);
			return null;
		}
	}
/**
	 * A JSONObject representing the available information from this annotation.
	 * 
	 * @return A JSONObject representing this object. If there is an error 
	 * 		   building this object, null is returned.
	 */
A JSONObject representing the available information from this annotation.

@return A JSONObject representing this object. If there is an error
building this object, null is returned.
A JSONObject representing the available information from this annotation . @return A JSONObject representing this object . If there is an error building this object null is returned .
public JSONObject toJson() {
		try {
			JSONObject result = new JSONObject();
			result.put(JSON_KEY_ID, id);
			result.put(JSON_KEY_TEXT, text);
			result.put(JSON_KEY_TIME, epochMillis);
			result.put(JSON_KEY_TIMEZONE, timezone.getID());
			result.put(JSON_KEY_AUTHOR, author);
			return result;
		}
		catch(JSONException e) {
			LOGGER.error("Error building the JSONObject.", e);
			return null;
		}
	}
public JSONObject toJson ( ) { try { JSONObject result = new JSONObject ( ) ; result . put ( JSON_KEY_ID , id ) ; result . put ( JSON_KEY_TEXT , text ) ; result . put ( JSON_KEY_TIME , epochMillis ) ; result . put ( JSON_KEY_TIMEZONE , timezone . getID ( ) ) ; result . put ( JSON_KEY_AUTHOR , author ) ; return result ; } catch ( JSONException e ) { LOGGER . error ( "Error building the JSONObject." , e ) ; return null ; } }
A JSONObject representing the available information from this annotation.
A JSONObject representing the available information from this annotation .