src/org/ohmage/domain/Audit.java
public JSONObject toJson() {
		try {
			JSONObject result = new JSONObject();
			
			result.put(JSON_KEY_REQUEST_TYPE, requestType.toString());
			result.put(JSON_KEY_URI, uri);
			result.put(JSON_KEY_CLIENT, client);
			result.put(JSON_KEY_DEVICE_ID, deviceId);
			result.put(JSON_KEY_RESPONSE, response);
			
			result.put(JSON_KEY_RECEIVED_MILLIS, receivedMillis);
			result.put(JSON_KEY_RESPONDED_MILLIS, respondedMillis);
			result
				.put(
					JSON_KEY_DB_TIMESTAMP,
					ISODateTimeFormat.dateTime().print(dbTimestamp.getTime()));
			
			result.put(JSON_KEY_PARAMETERS, parameters);
			result.put(JSON_KEY_EXTRAS, extras);
			
			return result;
		}
		catch(JSONException e) {
			LOGGER.error("Error building the JSONObject.", e);
			return null;
		}
	}
/**
	 * A JSONObject representing the available information from this audit.
	 * 
	 * @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 audit.

@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 audit . @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_REQUEST_TYPE, requestType.toString());
			result.put(JSON_KEY_URI, uri);
			result.put(JSON_KEY_CLIENT, client);
			result.put(JSON_KEY_DEVICE_ID, deviceId);
			result.put(JSON_KEY_RESPONSE, response);
			result.put(JSON_KEY_RECEIVED_MILLIS, receivedMillis);
			result.put(JSON_KEY_RESPONDED_MILLIS, respondedMillis);
			result
				.put(
					JSON_KEY_DB_TIMESTAMP,
					ISODateTimeFormat.dateTime().print(dbTimestamp.getTime()));
			result.put(JSON_KEY_PARAMETERS, parameters);
			result.put(JSON_KEY_EXTRAS, extras);
			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_REQUEST_TYPE , requestType . toString ( ) ) ; result . put ( JSON_KEY_URI , uri ) ; result . put ( JSON_KEY_CLIENT , client ) ; result . put ( JSON_KEY_DEVICE_ID , deviceId ) ; result . put ( JSON_KEY_RESPONSE , response ) ; result . put ( JSON_KEY_RECEIVED_MILLIS , receivedMillis ) ; result . put ( JSON_KEY_RESPONDED_MILLIS , respondedMillis ) ; result . put ( JSON_KEY_DB_TIMESTAMP , ISODateTimeFormat . dateTime ( ) . print ( dbTimestamp . getTime ( ) ) ) ; result . put ( JSON_KEY_PARAMETERS , parameters ) ; result . put ( JSON_KEY_EXTRAS , extras ) ; return result ; } catch ( JSONException e ) { LOGGER . error ( "Error building the JSONObject." , e ) ; return null ; } }
A JSONObject representing the available information from this audit.
A JSONObject representing the available information from this audit .