public String optString ( String key , String defaultValue ) { LazyNode token = getOptionalFieldToken ( key ) ; if ( token == null ) return defaultValue ; if ( token . type == LazyNode . VALUE_NULL ) return defaultValue ; return token . getStringValue ( ) ; }
Returns the string value stored in this object for the given key . Returns the default value if there is no such key .