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

        JSONObject returnVal = super.toJsonObject();

        //User...
        if(this.getUser() != null)
        {
            returnVal.put(JSONMapping.USER,
                    this.getUser().toJsonObject());
        }

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

        //Date Read...
        if(this.getDateRead() != null)
        {
            returnVal.put(JSONMapping.DATE_READ,
                    this.getDateAsLongFromJson(this.getDateRead()));
        }

        //Expiring Link...
        if(this.getExpiringLink() != null)
        {
            returnVal.put(JSONMapping.EXPIRING_LINK, this.getExpiringLink());
        }

        //Message...
        if(this.getMessage() != null)
        {
            returnVal.put(JSONMapping.MESSAGE, this.getMessage());
        }

        //User Notification Type...
        returnVal.put(JSONMapping.USER_NOTIFICATION_TYPE, this.getUserNotificationType());
        
        return returnVal;
    }
@Override
    public JSONObject toJsonObject() throws JSONException {

        JSONObject returnVal = super.toJsonObject();

        //User...
        if(this.getUser() != null)
        {
            returnVal.put(JSONMapping.USER,
                    this.getUser().toJsonObject());
        }

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

        //Date Read...
        if(this.getDateRead() != null)
        {
            returnVal.put(JSONMapping.DATE_READ,
                    this.getDateAsLongFromJson(this.getDateRead()));
        }

        //Expiring Link...
        if(this.getExpiringLink() != null)
        {
            returnVal.put(JSONMapping.EXPIRING_LINK, this.getExpiringLink());
        }

        //Message...
        if(this.getMessage() != null)
        {
            returnVal.put(JSONMapping.MESSAGE, this.getMessage());
        }

        //User Notification Type...
        returnVal.put(JSONMapping.USER_NOTIFICATION_TYPE, this.getUserNotificationType());
        
        return returnVal;
    }
@ Override public JSONObject toJsonObject ( ) throws JSONException { JSONObject returnVal = super . toJsonObject ( ) ; //User... if ( this . getUser ( ) != null ) { returnVal . put ( JSONMapping . USER , this . getUser ( ) . toJsonObject ( ) ) ; } //Date Created... if ( this . getDateCreated ( ) != null ) { returnVal . put ( JSONMapping . DATE_CREATED , this . getDateAsLongFromJson ( this . getDateCreated ( ) ) ) ; } //Date Read... if ( this . getDateRead ( ) != null ) { returnVal . put ( JSONMapping . DATE_READ , this . getDateAsLongFromJson ( this . getDateRead ( ) ) ) ; } //Expiring Link... if ( this . getExpiringLink ( ) != null ) { returnVal . put ( JSONMapping . EXPIRING_LINK , this . getExpiringLink ( ) ) ; } //Message... if ( this . getMessage ( ) != null ) { returnVal . put ( JSONMapping . MESSAGE , this . getMessage ( ) ) ; } //User Notification Type... returnVal . put ( JSONMapping . USER_NOTIFICATION_TYPE , this . getUserNotificationType ( ) ) ; return returnVal ; }
Conversion to {@code JSONObject} from Java Object.

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

@see ABaseFluidJSONObject#toJsonObject()
Conversion to { @code JSONObject } from Java Object .