Convert the model to a hash all of the way down.
767282
def to_h
      @size_dep.depend

      if @attributes.nil?
        nil
      else
        hash = {}
        @attributes.each_pair do |key, value|
          hash[key] = deep_unwrap(value)
        end
        hash
      end
    end
1231331
def to_hash
      stringified_params = Hash[parameters.map { |key, val| [key.to_s, val] }]
      base_hash.merge(stringified_params)
    end
968602
def to_hash
      result = { }

      # id
      result['_id'] = @_id if @_id

      # timestamp
      result['at'] = @at

      # kind
      result['kind'] = kind.to_s

      # entities
      @entities.each do |entity_name, entity|
        result[entity_name.to_s] = entity.model_id
      end

      # meta
      result['meta'] = @meta.stringify_keys unless @meta.blank?

      result
    end
495295
def to_hash
      h = super
      (Stats::STATS - %w[ rate ]).each do |s|
        h[s] = self.send( s ) 
      end
      return h
    end
1178109
def to_hash
            index_hash = Hash.new
            index_hash["json_claz"] = self.class.name
            index_hash["id"] = id
            index_hash["account_id"] = account_id
            index_hash["credit"] = credit
            index_hash["biller_credit"] = biller_credit
            index_hash["created_at"] = created_at
            index_hash["updated_at"] = updated_at
            index_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
530368
def hash(self, val):
        """"""

        if not isinstance(val, bytes):
            raise _TypeError("val", "bytes", val)

        rv = self.compute(val)

        if not isinstance(val, bytes):
            raise _TypeError("val", "bytes", rv)

        return rv
428685
def to_hash
      ret = {}
      @hash.dup.each_pair do |key, val|
        ret[key] = self.convert_value_from_ostruct(val)
      end
      ret
    end
255325
def part_of_model_to_rc *attrs
      attrs.map do |attr|
        value = get_model_attr_value attr
        hash_attr = get_rc_attr_from_hash attr.to_s
        attr = "rc.#{hash_attr}=#{value}"
      end
    end
1098590
def convert(jkf)
      jkf = jkf.is_a?(Hash) ? jkf : JSON.parse(jkf)
      convert_root(jkf)
    end
664583
def to_hash
      result = {}

      @values.keys.each do |field_name|
        value = __send__(field_name)
        hashed_value = value.respond_to?(:to_hash_value) ? value.to_hash_value : value
        result.merge!(field_name => hashed_value)
      end

      result
    end
243890
def to_hbs
      h = {:model => self.class.name.downcase}
      self.hbs_attributes.each do |attr|
        h[attr] = self.send(attr)

        ans = h[attr].class.ancestors
        if h[attr].class.respond_to?(:hbs_serializable) || ans.include?(Enumerable) || ans.include?(ActiveModel::Validations)
          h[attr] = h[attr].to_hbs
        else
        end
      end
      h
    end
336738
def process_hash(value)
      result = {}
      unless value.empty?
        value.split(",").each do |s|
          k,v = s.split(':').compact.map { |i| i.to_s.strip }
          result[k] = v.to_s
        end
      end
      result
    end
1166757
def to_child_hash
      hash = {}
      children { |child| hash[child.name] = child.value }
      return hash
    end
56489
def to_input_hash
      HASH_SCHEMA.schema(
        map { |attr| [attr.name, attr.to_write_type] }.to_h
      )
    end
526514
def to_hash(options = {})
      out = {}
      each_key do |k|
        assignment_key =
          if options[:stringify_keys]
            k.to_s
          elsif options[:symbolize_keys]
            k.to_s.to_sym
          else
            k
          end
        if self[k].is_a?(Array)
          out[assignment_key] ||= []
          self[k].each do |array_object|
            out[assignment_key] << maybe_convert_to_hash(array_object, options)
          end
        else
          out[assignment_key] = maybe_convert_to_hash(self[k], options)
        end
      end
      out
    end
215944
def to_hash(obj)
      return nil unless obj
      return obj if obj.is_a?(Hash)

      hash = {}
      obj.instance_variables.each do |key|
        hash[key[1..-1].to_sym] = deeply_to_hash(obj.instance_variable_get(key))
      end
      hash
    end