Transform the ruby obj ->  to a Hash
350658
def to_hash
      index_hash = Hash.new
      index_hash["json_claz"] = self.class.name

      index_hash["id"] = id
      index_hash["name"] = name
      index_hash["description"] = description
      index_hash["project"] = project
      index_hash["wiki_name"] = wiki_name
      index_hash["public_permissions"] = public_permissions
      index_hash["team_permissions"] = team_permissions
      index_hash["watcher_permissions"] = watcher_permissions
      index_hash["share_permissions"] = share_permissions
      index_hash["team_tab_role"] = team_tab_role
      index_hash["created_at"] = created_at
      index_hash["updated_at"] = updated_at
      index_hash["default_showpage"] = default_showpage
      index_hash["tabs_order"] = tabs_order
      index_hash["parent_id"] = parent_id
      index_hash["restricted"] = restricted
      index_hash["restricted_date"] = restricted_date
      index_hash["commercial_from"] = commercial_from
      index_hash["banner"] = banner
      index_hash["banner_height"] = banner_height
      index_hash["banner_text"] = banner_text
      index_hash["banner_link"] = banner_link
      index_hash["style"] = style
      index_hash["status"] = status
      index_hash["approved"] = approved
      index_hash["is_manager"] = is_manager
      index_hash["is_volunteer"] = is_volunteer
      index_hash["is_commercial"] = is_commercial
      index_hash["can_join"] = can_join
      index_hash["can_apply"] = can_apply
      index_hash["last_payer_changed_at"] = last_payer_changed_at
      index_hash
    end
1371964
def to_h
      sanitized_params.each_with_object({}) do |(key, value), hash|
        hash[key] = transform(key, value)
      end
    end
578937
function hash(object) {
  return crypto
    .createHash('sha256')
    .update(typeof object === 'string' ? object : JSON.stringify(object))
    .digest('base64')
}
1204580
def to_hash
            index_hash = Hash.new
            index_hash["json_claz"] = self.class.name
            index_hash["id"] = id
            index_hash["org_id"] = org_id
            index_hash["name"] = name
            index_hash["accounts_id"] = accounts_id
            index_hash["inputs"] = inputs
            index_hash["assemblies"] = assemblies
            index_hash["created_at"] = created_at
            index_hash["some_msg"] = some_msg
            index_hash
        end
10691
def to_hash
      _copy = {}
      @table.each { |key, value| _copy[key] = value.is_a?(HashStruct) ? value.to_hash : value }
      _copy
    end
215612
def to_hash
      {}.tap do |hash|
        _attributes.each do |key, value|
          hash[key] = value.respond_to?(:to_hash) ? value.to_hash : value
        end
      end
    end
681837
def to_hash
      result = {}
      @lines.entries.each do |section|
        result[section.key] ||= {}
        section.entries.each do |option|
          opts = Array(option)
          val = opts.map { |o| o.respond_to?(:value) ? o.value : o }
          val = val.size > 1 ? val : val.first
          result[section.key][opts.first.key] = val
        end
      end
      result
    end
1170958
def to_hash
      characteristics.inject({}) do |memo, (k, v)|
        memo[k] = v.value
        memo
      end
    end
1212353
def prepare_string_for_hashing(obj, ignore_string_type_changes=False, ignore_string_case=False):
    
    original_type = obj.__class__.__name__
    if isinstance(obj, bytes):
        obj = obj.decode('utf-8')
    if not ignore_string_type_changes:
        obj = KEY_TO_VAL_STR.format(original_type, obj)
    if ignore_string_case:
        obj = obj.lower()
    return obj
634372
def to_hash()
      ret_hash = {}
      self.class.json_attributes.each do |attrib|
        ret_hash[attrib] = self.send(attrib.to_s.underscore)
      end
      return ret_hash
    end
457234
def to_hash
            index_hash = {}
            index_hash['json_claz'] = self.class.name
            index_hash['id'] = id
            index_hash["asms_id"] = asms_id
            index_hash['name'] = name
            index_hash['components'] = components
            index_hash['tosca_type'] = tosca_type
            index_hash['policies'] = policies
            index_hash['inputs'] = inputs
            index_hash['outputs'] = outputs
            index_hash['status'] = status
            index_hash['state'] = state
            index_hash['created_at'] = created_at
            index_hash
        end
1044757
def _to_hash(value)
      if value.is_a?(Array)
        value.compact.map{ |v| _to_hash(v) }
      elsif value.is_a?(Hash)
        {}.tap do |hash|
          value.each { |k, v| hash[k] = _to_hash(v) }
        end
      elsif value.respond_to? :to_hash
        value.to_hash
      else
        value
      end
    end
1233898
def to_hash(args = {}) # :nodoc:
      args ||= {}
      hash = {}

      self.attributes.each do |name, value|
        hash[name] = if value.is_a?(::Array)
          value.map {|x| x.respond_to?(:to_hash) ? call_method_with_optional_parameters(x, :to_hash, :nested => true) : x}
        elsif value.respond_to?(:to_hash)
          call_method_with_optional_parameters(value, :to_hash, :nested => true)
        elsif value.respond_to?(:as_json)
          value.as_json(:nested => true)
        else
          value
        end
      end

      hash
    end
1230386
def to_hash
      hash = {}
      attributes = self.class.attribute_map.sort_by {|key,value| key}
      attributes.each { |attr, param|
        value = self.send(attr)
        next if value.nil?
        if value.is_a?(Array)
          hash[param] = value.compact.map{ |v| _to_hash(v) }
        else
          hash[param] = _to_hash(value)
        end
      }
      hash
    end
1231331
def to_hash
      stringified_params = Hash[parameters.map { |key, val| [key.to_s, val] }]
      base_hash.merge(stringified_params)
    end
1256900
def array_to_hash(array)
      case array
        when self.class
          array.to_hash
        when Array
          array.map { |element| array_to_hash(element) }
        else
          array
      end
    end
725201
def to_hash
      {}.merge(@properties).tap do |h|
        h['_links'] = {}.merge @links    unless @links.empty?

        combined_embedded = {}
        combined_embedded.merge! @embedded unless @embedded.empty?
        combined_embedded.merge! @embedded_arrays unless @embedded_arrays.empty?
        h['_embedded'] = combined_embedded unless combined_embedded.empty?
      end
    end