public JSONObject toJson ( ) { JSONObject ret = new JSONObject ( ) ; ret . put ( "url" , url ) ; if ( user != null ) { ret . put ( "user" , user ) ; ret . put ( "password" , password ) ; } return ret ; }
Get a JSON representation of this target configuration