Converts all the keys of a Hash to Symbols.

 @param [Hash{Object => Object}] hash
   The hash to be converted.

 @return [Hash{Symbol => Object}]
   The normalized Hash.
509546
def normalize_hash(hash)
      new_hash = {}

      hash.each do |key,value|
        new_hash[key.to_sym] = normalize(value)
      end

      return new_hash
    end
685268
def convert object
      return {resource_name => object} if object.is_a? Hash
      {resource_name =>  object.to_hash}
    end
1166757
def to_child_hash
      hash = {}
      children { |child| hash[child.name] = child.value }
      return hash
    end
125047
def to_hash
      Hash[options.reject(&:null?).map { |o| [o.key, o.value] }]
    end
1130370
def indifferent_hash
      Hash.new {|hash,key| hash[key.to_sym] if String === key }
    end
314020
def normalize!(params)
      case params
      when Hash
        params.keys.each do |k|
          params[k.to_s] = params.delete(k)
          normalize!(params[k.to_s])
        end
      when Array
        params.map! do |el|
          normalize!(el)
        end
      end
      params
    end
847421
@SuppressWarnings("unchecked")
	public static <V> Map<String,V> toUnderscoreHash(Map<String,V> hash) {
		if (hash == null) return null;
		
		Map<String,V> newHash = new HashMap<String,V>();
		
		for (Map.Entry<String, V> entry : hash.entrySet())
		{
			V value = entry.getValue();
			
			// Apply toUnderscoreHash recursively on sub-hashes
			if (value instanceof Map) {
				value = (V) toUnderscoreHash((Map<String,Object>) value);
			}
			newHash.put(MnoStringHelper.toSnakeCase(entry.getKey()), value);
			
		}
		
		return newHash;
	}
221373
def stringify( hash )

            keys = @sorted ? hash.keys.sort : hash.keys
            vals = keys.map{ |key|
                val = ''
                if hash[key].kind_of?( Array ) 
                    val = rotate( hash[key] )
                elsif hash[key].kind_of?( Hash )
                    val = @sorted ? hash[key].keys.sort[0] : hash[key].keys[0]
                else
                    val = hash[key]
                end
                "#{key}: #{val}"
            }
            return vals.join( '; ' ) + (vals.length ? ';' : '')

        end
965194
def flatten_nested_hash(hash, brackets = true)
      f = {}
      hash.each do |key, value|
        _key = brackets ? "[#{key}]" : key.to_s
        if value.class == Hash
          flatten_nested_hash(value).each do |k, v|
            f["#{_key}#{k}"] = v
          end
        elsif value.class == Array
          temp_hash = {}
          value.each_with_index do |v, i|
             temp_hash[i.to_s] = v
          end
          flatten_nested_hash(temp_hash).each do |k, v|
            f["#{_key}#{k}"] = v
          end

        else
          f[_key] = value
        end
      end
      return f
    end
192945
def transform_hash(hash, path = "")
      hash.each_with_object({}) do |(k, v), ret|
        key = path + k.to_s

        if v.is_a?(Hash)
          ret.merge! transform_hash(v, "#{key}:")
        else
          ret[key] = v
        end
      end
    end
528652
def convert_hash_keys(value)
        case value
        when Array
          value.map { |v| convert_hash_keys(v) }
        when Hash
          Hash[value.map { |k, v| [k.to_snake_case.to_sym, convert_hash_keys(v)] }]
        else
          value
        end
      end
611315
def hash_to_liquid(hash)
      hash.map { |key, value| [key.to_s, empty2nil(value)] }.to_h
    end
310667
def convert_to_hash(object)
      if !object.respond_to?(:to_hash)
        return nil
      end

      if object.method(:to_hash).arity != 0
        return nil
      end

      hash = object.to_hash
      if !hash.respond_to?(:keys) || !hash.respond_to?('[]')
        return nil
      end

      return hash
    end
1231331
def to_hash
      stringified_params = Hash[parameters.map { |key, val| [key.to_s, val] }]
      base_hash.merge(stringified_params)
    end
968855
def convert_to_hash(data)
      data.map do |item|
        item[:key].split('/').reverse.reduce(item[:value]) { |h, v| { v => h } }
      end.reduce(:deep_merge)
    end
451098
def symbolize_keys(hash)
      Hash[hash.map{|(k,v)| [k.to_sym,v]}]
    end
1264632
def properties_from_hash(hash)
      hash.each_with_object({}) do |(k, v), newhash|
        k = k.tr("-", "_")
        k = "_#{k}" if k =~ /^\d/
        self.class.property :"#{k}"
        newhash[k] = v
        newhash
      end
    end