Transform the ruby obj ->  to a Hash
979888
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["asm_id"] = asm_id
            index_hash["org_id"] = org_id
            index_hash["labels"] = labels
            index_hash["tosca_type"] = tosca_type
            index_hash["inputs"] = inputs
            index_hash["outputs"] = outputs
            index_hash["name"] = name
            index_hash["status"] = status
            index_hash["image_id"] = image_id
            index_hash["created_at"] = created_at
            index_hash["some_msg"] = some_msg
            index_hash
        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
1166757
def to_child_hash
      hash = {}
      children { |child| hash[child.name] = child.value }
      return hash
    end
1168899
def to_params_hash(keys,values)
      hash = {}
      keys.size.times { |i| hash[ keys[i].to_sym ] = values[i] }
      hash
    end
93391
def to_hash
        h = {}
        keys.each { |k| h[ k ] = self.fetch( k ) }
        h
    end
31477
def to_h
      hash = {}
      @data.each_pair do |key, value|
        hash[key] = value.to_h
      end
      
      hash      
    end
1020721
function hashObject (obj) {
  if (!isObject(obj)) return null;
  return shortHash(JSON.stringify(sortKeys(obj, { deep: true })));
}
202842
def to_hash
            index_hash = {}
            index_hash['json_claz'] = self.class.name
            index_hash['id'] = id
            index_hash['provided_by'] = provided_by
            index_hash['cattype'] = cattype
            index_hash['flavor'] = flavor
            index_hash['image'] = image
            index_hash['catorder'] = catorder
            index_hash['url'] = url
            index_hash['envs'] = envs
            index_hash['options'] = options
            index_hash['plans'] = plans
            index_hash['created_at'] = created_at
            index_hash['updated_at'] = updated_at
            index_hash['status'] = status
            index_hash['inputs'] = inputs
            index_hash['outputs'] = outputs
            index_hash['acl_policies'] = acl_policies
            index_hash["some_msg"] = some_msg
            index_hash
        end
268613
def to_hash
            index_hash = {}
            index_hash['json_claz'] = self.class.name
            index_hash['id'] = id
            index_hash['name'] = name
            index_hash['tosca_type'] = tosca_type
            index_hash['inputs'] = inputs
            index_hash['outputs'] = outputs
            index_hash['envs'] = envs
            index_hash['artifacts'] = artifacts
            index_hash['related_components'] = related_components
            index_hash['operations'] = operations
            index_hash['status'] = status
            index_hash['state'] = state
            index_hash['repo'] = repo
            index_hash['created_at'] = created_at
            index_hash
        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
593834
def to_hash
      hash = {}

      instance_variables.each do |v|
        hash[v.to_s[1..-1].to_sym] = instance_variable_get(v)
      end

      hash[:results].each do |c|
        hash[:results][hash[:results].index(c)] = c.to_hash
      end

      hash
    end
1231331
def to_hash
      stringified_params = Hash[parameters.map { |key, val| [key.to_s, val] }]
      base_hash.merge(stringified_params)
    end
470987
def to_hash
            index_hash = {}
            index_hash['json_claz'] = self.class.name
            index_hash['id'] = id

            index_hash['sensor_type'] = sensor_type
            index_hash['payload'] = payload
            index_hash['created_at'] = created_at
            index_hash
        end
1190274
def to_hash
      ret = {}
      self.each_pair do |k, v|
        ret[k] = v.to_hash()
      end
      ret
    end
141348
def to_hash
      out = {}
      self.class.properties.each { |p| out[hash_key(p)] = hash_value(p) }
      out
    end
771377
def to_hash
      hash = {}
      hash["attrs"] = @attrs

      self.instance_variables.keep_if { |key| key != :@attrs }.each do |var|
        val = self.instance_variable_get(var)
        hash["attrs"][var.to_s.delete("@").to_sym] = val.to_hash if val.is_a? ACTV::Base
      end

      hash["attrs"]
    end
1119671
def convert_map_to_hash(object, &block)
      hash = Hash.new
      i = object.entrySet.iterator
      if block_given?
        while i.hasNext
          entry = i.next
          yield hash, entry.getKey, entry.getValue
        end
      else
        while i.hasNext
          entry = i.next
          hash[entry.getKey] = entry.getValue
        end
      end
      hash
    end