vendor/bundle/jruby/2.3.0/gems/logstash-filter-urldecode-3.0.6/lib/logstash/filters/urldecode.rb
# Attempt to handle string, array, and hash values for fields.
# For all other datatypes, just return, URI.unescape doesn't support them.
Attempt to handle string, array, and hash values for fields.
For all other datatypes, just return, URI.unescape doesn't support them.
Attempt to handle string array and hash values for fields . For all other datatypes just return URI . unescape doesn ' t support them .
def urldecode(value)
    case value
    when String
      escaped = unescape(value)
      return @converter.convert(escaped)
    when Array
      ret_values = []
      value.each { |v| ret_values << urldecode(v) }
      return ret_values
    when Hash
      ret_values = {}
      value.each { |k,v| ret_values[k] = urldecode(v) }
      return ret_values
    else
      return value
    end
  end
def urldecode ( value ) case value when String escaped = unescape ( value ) return @converter . convert ( escaped ) when Array ret_values = [ ] value . each { | v | ret_values << urldecode ( v ) } return ret_values when Hash ret_values = { } value . each { | k , v | ret_values [ k ] = urldecode ( v ) } return ret_values else return value end end
Attempt to handle string, array, and hash values for fields.
Attempt to handle string array and hash values for fields .
value
<not_specific>