fluid-api/src/main/java/com/fluidbpm/program/api/vo/user/User.java
@Override
	@XmlTransient
	public JSONObject toJsonObject() throws JSONException {

		JSONObject returnVal = super.toJsonObject();

		//Active...
		returnVal.put(JSONMapping.ACTIVE, this.isActive());

		//Invalid Login Count...
		returnVal.put(JSONMapping.INVALID_LOGIN_COUNT,
				this.getInvalidLoginCount());

		//Username...
		if(this.getUsername() != null)
		{
			returnVal.put(JSONMapping.USERNAME,this.getUsername());
		}

		//Password Sha 256...
		if(this.getPasswordSha256() != null)
		{
			returnVal.put(JSONMapping.PASSWORD_SHA_256,this.getPasswordSha256());
		}

		//Password Clear...
		if(this.getPasswordClear() != null)
		{
			returnVal.put(JSONMapping.PASSWORD_CLEAR,this.getPasswordClear());
		}

		//Date Created...
		if(this.getDateCreated() != null)
		{
			returnVal.put(User.JSONMapping.DATE_CREATED,
					this.getDateAsLongFromJson(this.getDateCreated()));
		}

		//Date Last Updated...
		if(this.getDateLastUpdated() != null)
		{
			returnVal.put(User.JSONMapping.DATE_LAST_UPDATED,
					this.getDateAsLongFromJson(this.getDateLastUpdated()));
		}

		//Password Changed At...
		if(this.getPasswordChangedAt() != null)
		{
			returnVal.put(JSONMapping.PASSWORD_CHANGED_AT,
					this.getDateAsLongFromJson(this.getPasswordChangedAt()));
		}

		//Logged In Date Time...
		if(this.getLoggedInDateTime() != null)
		{
			returnVal.put(JSONMapping.LOGGED_IN_DATE_TIME,
					this.getDateAsLongFromJson(this.getLoggedInDateTime()));
		}

		//SALT...
		if(this.getSalt() != null)
		{
			returnVal.put(JSONMapping.SALT,this.getSalt());
		}

		//Timezone...
		if(this.getTimezone() != null)
		{
			returnVal.put(JSONMapping.TIMEZONE,
					this.getTimezone().doubleValue());
		}

		//Date Format...
		if(this.getDateFormat() != null)
		{
			returnVal.put(JSONMapping.DATE_FORMAT, this.getDateFormat());
		}

		//Time Format...
		if(this.getTimeFormat() != null)
		{
			returnVal.put(JSONMapping.TIME_FORMAT, this.getTimeFormat());
		}

		//Locale...
		if(this.getLocale() != null) {
			returnVal.put(JSONMapping.LOCALE, this.getLocale());
		}

		//Email Notification...
		returnVal.put(JSONMapping.EMAIL_USER_NOTIFICATION, this.isEmailUserNotification());

		//Roles...
		if(this.getRoles() != null && !this.getRoles().isEmpty())
		{
			JSONArray rolesArr = new JSONArray();
			for(Role toAdd :this.getRoles())
			{
				rolesArr.put(toAdd.toJsonObject());
			}

			returnVal.put(JSONMapping.ROLES,rolesArr);
		}

		//Email Addresses...
		if(this.getEmailAddresses() != null &&
				!this.getEmailAddresses().isEmpty())
		{
			JSONArray emailArr = new JSONArray();
			for(String toAdd :this.getEmailAddresses())
			{
				emailArr.put(toAdd);
			}

			returnVal.put(JSONMapping.EMAIL_ADDRESSES, emailArr);
		}

		//User Fields...
		if(this.getUserFields() != null && !this.getUserFields().isEmpty())
		{
			JSONArray userFieldsArr = new JSONArray();
			for(Field toAdd :this.getUserFields())
			{
				userFieldsArr.put(toAdd.toJsonObject());
			}

			returnVal.put(JSONMapping.USER_FIELDS,userFieldsArr);
		}

		return returnVal;
	}
@Override
	@XmlTransient
	public JSONObject toJsonObject() throws JSONException {

		JSONObject returnVal = super.toJsonObject();

		//Active...
		returnVal.put(JSONMapping.ACTIVE, this.isActive());

		//Invalid Login Count...
		returnVal.put(JSONMapping.INVALID_LOGIN_COUNT,
				this.getInvalidLoginCount());

		//Username...
		if(this.getUsername() != null)
		{
			returnVal.put(JSONMapping.USERNAME,this.getUsername());
		}

		//Password Sha 256...
		if(this.getPasswordSha256() != null)
		{
			returnVal.put(JSONMapping.PASSWORD_SHA_256,this.getPasswordSha256());
		}

		//Password Clear...
		if(this.getPasswordClear() != null)
		{
			returnVal.put(JSONMapping.PASSWORD_CLEAR,this.getPasswordClear());
		}

		//Date Created...
		if(this.getDateCreated() != null)
		{
			returnVal.put(User.JSONMapping.DATE_CREATED,
					this.getDateAsLongFromJson(this.getDateCreated()));
		}

		//Date Last Updated...
		if(this.getDateLastUpdated() != null)
		{
			returnVal.put(User.JSONMapping.DATE_LAST_UPDATED,
					this.getDateAsLongFromJson(this.getDateLastUpdated()));
		}

		//Password Changed At...
		if(this.getPasswordChangedAt() != null)
		{
			returnVal.put(JSONMapping.PASSWORD_CHANGED_AT,
					this.getDateAsLongFromJson(this.getPasswordChangedAt()));
		}

		//Logged In Date Time...
		if(this.getLoggedInDateTime() != null)
		{
			returnVal.put(JSONMapping.LOGGED_IN_DATE_TIME,
					this.getDateAsLongFromJson(this.getLoggedInDateTime()));
		}

		//SALT...
		if(this.getSalt() != null)
		{
			returnVal.put(JSONMapping.SALT,this.getSalt());
		}

		//Timezone...
		if(this.getTimezone() != null)
		{
			returnVal.put(JSONMapping.TIMEZONE,
					this.getTimezone().doubleValue());
		}

		//Date Format...
		if(this.getDateFormat() != null)
		{
			returnVal.put(JSONMapping.DATE_FORMAT, this.getDateFormat());
		}

		//Time Format...
		if(this.getTimeFormat() != null)
		{
			returnVal.put(JSONMapping.TIME_FORMAT, this.getTimeFormat());
		}

		//Locale...
		if(this.getLocale() != null) {
			returnVal.put(JSONMapping.LOCALE, this.getLocale());
		}

		//Email Notification...
		returnVal.put(JSONMapping.EMAIL_USER_NOTIFICATION, this.isEmailUserNotification());

		//Roles...
		if(this.getRoles() != null && !this.getRoles().isEmpty())
		{
			JSONArray rolesArr = new JSONArray();
			for(Role toAdd :this.getRoles())
			{
				rolesArr.put(toAdd.toJsonObject());
			}

			returnVal.put(JSONMapping.ROLES,rolesArr);
		}

		//Email Addresses...
		if(this.getEmailAddresses() != null &&
				!this.getEmailAddresses().isEmpty())
		{
			JSONArray emailArr = new JSONArray();
			for(String toAdd :this.getEmailAddresses())
			{
				emailArr.put(toAdd);
			}

			returnVal.put(JSONMapping.EMAIL_ADDRESSES, emailArr);
		}

		//User Fields...
		if(this.getUserFields() != null && !this.getUserFields().isEmpty())
		{
			JSONArray userFieldsArr = new JSONArray();
			for(Field toAdd :this.getUserFields())
			{
				userFieldsArr.put(toAdd.toJsonObject());
			}

			returnVal.put(JSONMapping.USER_FIELDS,userFieldsArr);
		}

		return returnVal;
	}
Conversion to {@code JSONObject} from Java Object.

@return {@code JSONObject} representation of {@code User}
@throws JSONException If there is a problem with the JSON Body.

@see ABaseFluidJSONObject#toJsonObject()