src/org/ohmage/domain/ServerConfig.java
public JSONObject toJson() throws JSONException {
		JSONObject result = new JSONObject();
		
		result.put(JSON_KEY_APPLICATION_NAME, appName);
		result.put(JSON_KEY_APPLICATION_VERSION, appVersion);
		result.put(JSON_KEY_APPLICATION_BUILD, appBuild);
		result.put(JSON_KEY_DEFAULT_CAMPAIGN_CREATION_PRIVILEGE, defaultCampaignCreationPrivilege);
		result.put(JSON_KEY_DEFAULT_SURVEY_RESPONSE_PRIVACY_STATE, defaultSurveyResponsePrivacyState);
		result.put(JSON_KEY_SURVEY_RESPONSE_PRIVACY_STATES, new JSONArray(surveyResponsePrivacyStates));
		result.put(JSON_KEY_MOBILITY_ENABLED, mobilityEnabled);
		result.put(JSON_KEY_AUTH_TOKEN_LIFETIME, authTokenLifetime);
		result.put(JSON_KEY_MAXIMUM_REQUEST_SIZE, maxRequestSize);
		result.put(JSON_KEY_MAXIMUM_PARAMETER_SIZE, maxParamSize);
		result.put(JSON_KEY_SELF_REGISTRATION_ALLOWED, selfRegistrationAllowed);
		result.put(JSON_KEY_USER_SETUP_ENABLED, userSetupEnabled);
		result.put(JSON_KEY_KEYCLOAK_AUTH_ENABLED, keycloakAuthEnabled);
		result.put(JSON_KEY_LOCAL_AUTH_ENABLED, localAuthEnabled);
		result.put(JSON_KEY_PUBLIC_CLASS_ID, publicClassId);
	
		return result;
	}
/**
	 * Returns this server configuration as a JSONObject.
	 * 
	 * @return This server configuration as a JSONObject.
	 * 
	 * @throws JSONException Thrown if there is an error building the 
	 * 						 JSONObject.
	 */
Returns this server configuration as a JSONObject.

@return This server configuration as a JSONObject.

@throws JSONException Thrown if there is an error building the
JSONObject.
Returns this server configuration as a JSONObject . @return This server configuration as a JSONObject . @throws JSONException Thrown if there is an error building the JSONObject .
public JSONObject toJson() throws JSONException {
		JSONObject result = new JSONObject();
		result.put(JSON_KEY_APPLICATION_NAME, appName);
		result.put(JSON_KEY_APPLICATION_VERSION, appVersion);
		result.put(JSON_KEY_APPLICATION_BUILD, appBuild);
		result.put(JSON_KEY_DEFAULT_CAMPAIGN_CREATION_PRIVILEGE, defaultCampaignCreationPrivilege);
		result.put(JSON_KEY_DEFAULT_SURVEY_RESPONSE_PRIVACY_STATE, defaultSurveyResponsePrivacyState);
		result.put(JSON_KEY_SURVEY_RESPONSE_PRIVACY_STATES, new JSONArray(surveyResponsePrivacyStates));
		result.put(JSON_KEY_MOBILITY_ENABLED, mobilityEnabled);
		result.put(JSON_KEY_AUTH_TOKEN_LIFETIME, authTokenLifetime);
		result.put(JSON_KEY_MAXIMUM_REQUEST_SIZE, maxRequestSize);
		result.put(JSON_KEY_MAXIMUM_PARAMETER_SIZE, maxParamSize);
		result.put(JSON_KEY_SELF_REGISTRATION_ALLOWED, selfRegistrationAllowed);
		result.put(JSON_KEY_USER_SETUP_ENABLED, userSetupEnabled);
		result.put(JSON_KEY_KEYCLOAK_AUTH_ENABLED, keycloakAuthEnabled);
		result.put(JSON_KEY_LOCAL_AUTH_ENABLED, localAuthEnabled);
		result.put(JSON_KEY_PUBLIC_CLASS_ID, publicClassId);
		return result;
	}
public JSONObject toJson ( ) throws JSONException { JSONObject result = new JSONObject ( ) ; result . put ( JSON_KEY_APPLICATION_NAME , appName ) ; result . put ( JSON_KEY_APPLICATION_VERSION , appVersion ) ; result . put ( JSON_KEY_APPLICATION_BUILD , appBuild ) ; result . put ( JSON_KEY_DEFAULT_CAMPAIGN_CREATION_PRIVILEGE , defaultCampaignCreationPrivilege ) ; result . put ( JSON_KEY_DEFAULT_SURVEY_RESPONSE_PRIVACY_STATE , defaultSurveyResponsePrivacyState ) ; result . put ( JSON_KEY_SURVEY_RESPONSE_PRIVACY_STATES , new JSONArray ( surveyResponsePrivacyStates ) ) ; result . put ( JSON_KEY_MOBILITY_ENABLED , mobilityEnabled ) ; result . put ( JSON_KEY_AUTH_TOKEN_LIFETIME , authTokenLifetime ) ; result . put ( JSON_KEY_MAXIMUM_REQUEST_SIZE , maxRequestSize ) ; result . put ( JSON_KEY_MAXIMUM_PARAMETER_SIZE , maxParamSize ) ; result . put ( JSON_KEY_SELF_REGISTRATION_ALLOWED , selfRegistrationAllowed ) ; result . put ( JSON_KEY_USER_SETUP_ENABLED , userSetupEnabled ) ; result . put ( JSON_KEY_KEYCLOAK_AUTH_ENABLED , keycloakAuthEnabled ) ; result . put ( JSON_KEY_LOCAL_AUTH_ENABLED , localAuthEnabled ) ; result . put ( JSON_KEY_PUBLIC_CLASS_ID , publicClassId ) ; return result ; }
Returns this server configuration as a JSONObject.
Returns this server configuration as a JSONObject .