public String optString ( int index , String defaultValue ) { Object object = this . opt ( index ) ; return JSONObject . NULL . equals ( object ) ? defaultValue : object . toString ( ) ; }
Get the optional string associated with an index . The defaultValue is returned if the key is not found .