@Override
    public JSONObject toJsonObject() throws JSONException {

        JSONObject returnVal = super.toJsonObject();

        //Client ID...
        if(this.getClientId() != null)
        {
            returnVal.put(JSONMapping.CLIENT_ID,this.getClientId());
        }

        //Client Secret...
        if(this.getClientSecret() != null)
        {
            returnVal.put(JSONMapping.CLIENT_SECRET,this.getClientSecret());
        }

        //Code...
        if(this.getCode() != null)
        {
            returnVal.put(JSONMapping.CODE,this.getCode());
        }

        //Grant Type...
        if(this.getGrantType() != null)
        {
            returnVal.put(JSONMapping.GRANT_TYPE,this.getGrantType());
        }

        //Redirect URI...
        if(this.getRedirectUri() != null)
        {
            returnVal.put(JSONMapping.REDIRECT_URI,this.getRedirectUri());
        }

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

        JSONObject returnVal = super.toJsonObject();

        
        if(this.getClientId() != null)
        {
            returnVal.put(JSONMapping.CLIENT_ID,this.getClientId());
        }

        
        if(this.getClientSecret() != null)
        {
            returnVal.put(JSONMapping.CLIENT_SECRET,this.getClientSecret());
        }

        
        if(this.getCode() != null)
        {
            returnVal.put(JSONMapping.CODE,this.getCode());
        }

        
        if(this.getGrantType() != null)
        {
            returnVal.put(JSONMapping.GRANT_TYPE,this.getGrantType());
        }

        
        if(this.getRedirectUri() != null)
        {
            returnVal.put(JSONMapping.REDIRECT_URI,this.getRedirectUri());
        }

        return returnVal;
    }
@ Override public JSONObject toJsonObject ( ) throws JSONException { JSONObject returnVal = super . toJsonObject ( ) ; //Client ID... if ( this . getClientId ( ) != null ) { returnVal . put ( JSONMapping . CLIENT_ID , this . getClientId ( ) ) ; } //Client Secret... if ( this . getClientSecret ( ) != null ) { returnVal . put ( JSONMapping . CLIENT_SECRET , this . getClientSecret ( ) ) ; } //Code... if ( this . getCode ( ) != null ) { returnVal . put ( JSONMapping . CODE , this . getCode ( ) ) ; } //Grant Type... if ( this . getGrantType ( ) != null ) { returnVal . put ( JSONMapping . GRANT_TYPE , this . getGrantType ( ) ) ; } //Redirect URI... if ( this . getRedirectUri ( ) != null ) { returnVal . put ( JSONMapping . REDIRECT_URI , this . getRedirectUri ( ) ) ; } return returnVal ; }
Conversion to {@code JSONObject} from Java Object.

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

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