src/org/ohmage/domain/UserSummary.java
public JSONObject toJsonObject() throws JSONException {
		JSONObject result = new JSONObject();
		
		result.put(JSON_KEY_EMAIL_ADDRESS, emailAddress);
		
		JSONObject permissions = new JSONObject();
		permissions.put(JSON_KEY_PERMISSIONS_ADMIN, isAdmin);
		permissions.put(JSON_KEY_PERMISSIONS_CAMPAIGN_CREATION, campaignCreationPrivilege);
		permissions.put(JSON_KEY_PERMISSIONS_CLASS_CREATION, classCreationPrivilege);
		permissions.put(JSON_KEY_PERMISSIONS_USER_SETUP, userSetupPrivilege);
		result.put(JSON_KEY_PERMISSIONS, permissions);
		
		result.put(JSON_KEY_CAMPAIGNS, campaigns);
		result.put(JSON_KEY_CAMPAIGN_ROLES, campaignRoles);
		
		result.put(JSON_KEY_CLASSES, classes);
		result.put(JSON_KEY_CLASS_ROLES, classRoles);
		
		return result;
	}
/**
	 * Creates a JSONObject representation of this instance of this class.
	 * 
	 * @return A JSONObject representation of this object.
	 */
Creates a JSONObject representation of this instance of this class.

@return A JSONObject representation of this object.
Creates a JSONObject representation of this instance of this class . @return A JSONObject representation of this object .
public JSONObject toJsonObject() throws JSONException {
		JSONObject result = new JSONObject();
		result.put(JSON_KEY_EMAIL_ADDRESS, emailAddress);
		JSONObject permissions = new JSONObject();
		permissions.put(JSON_KEY_PERMISSIONS_ADMIN, isAdmin);
		permissions.put(JSON_KEY_PERMISSIONS_CAMPAIGN_CREATION, campaignCreationPrivilege);
		permissions.put(JSON_KEY_PERMISSIONS_CLASS_CREATION, classCreationPrivilege);
		permissions.put(JSON_KEY_PERMISSIONS_USER_SETUP, userSetupPrivilege);
		result.put(JSON_KEY_PERMISSIONS, permissions);
		result.put(JSON_KEY_CAMPAIGNS, campaigns);
		result.put(JSON_KEY_CAMPAIGN_ROLES, campaignRoles);
		result.put(JSON_KEY_CLASSES, classes);
		result.put(JSON_KEY_CLASS_ROLES, classRoles);
		return result;
	}
public JSONObject toJsonObject ( ) throws JSONException { JSONObject result = new JSONObject ( ) ; result . put ( JSON_KEY_EMAIL_ADDRESS , emailAddress ) ; JSONObject permissions = new JSONObject ( ) ; permissions . put ( JSON_KEY_PERMISSIONS_ADMIN , isAdmin ) ; permissions . put ( JSON_KEY_PERMISSIONS_CAMPAIGN_CREATION , campaignCreationPrivilege ) ; permissions . put ( JSON_KEY_PERMISSIONS_CLASS_CREATION , classCreationPrivilege ) ; permissions . put ( JSON_KEY_PERMISSIONS_USER_SETUP , userSetupPrivilege ) ; result . put ( JSON_KEY_PERMISSIONS , permissions ) ; result . put ( JSON_KEY_CAMPAIGNS , campaigns ) ; result . put ( JSON_KEY_CAMPAIGN_ROLES , campaignRoles ) ; result . put ( JSON_KEY_CLASSES , classes ) ; result . put ( JSON_KEY_CLASS_ROLES , classRoles ) ; return result ; }
Creates a JSONObject representation of this instance of this class.
Creates a JSONObject representation of this instance of this class .