Convert the object into a json serializable dictionary.

        Note: It uses the private method _save_to_input_dict of the parent.

        :return dict: json serializable dictionary containing the needed information to instantiate the object
343378
def to_dict(self):
        

        input_dict = super(RBF, self)._save_to_input_dict()
        input_dict["class"] = "GPy.kern.RBF"
        input_dict["inv_l"] = self.use_invLengthscale
        if input_dict["inv_l"] == True:
            input_dict["lengthscale"] = np.sqrt(1 / float(self.inv_l))
        return input_dict
1003085
def serialize(self) -> dict:
        
        data = {**self}
        if "attachments" in self:
            data["attachments"] = json.dumps(self["attachments"])
        return data
125240
def to_dict(self):
        
        return {key: val.to_dict() if isinstance(val, NestedDict) else val
                for key, val in self.items()}
162943
def serialize(self):
        
        return json.dumps({
            "name": self.name,
            "ip": self.ip,
            "port": self.port
        }, sort_keys=True)
64089
def to_json(self):
    

    params = dict(self.__params)  # Shallow copy.
    if self._PROTOTYPE_REQUEST_PARAM in params:
      prototype_request = params[self._PROTOTYPE_REQUEST_PARAM]
      params[self._PROTOTYPE_REQUEST_PARAM] = prototype_request.Encode()
    if self._OFFSET_PARAM in params:
      params[self._OFFSET_PARAM] = base64.b64encode(params[self._OFFSET_PARAM])
    return params
194566
def to_dict(self):
        
        return {
            'mean': self.mean,
            'var': self.var,
            'min': self.min,
            'max': self.max,
            'num': self.num
        }
163229
def to_dict(self):
        

        input_dict = super(Standardize, self)._save_to_input_dict()
        input_dict["class"] = "GPy.util.normalizer.Standardize"
        if self.mean is not None:
            input_dict["mean"] = self.mean.tolist()
            input_dict["std"] = self.std.tolist()
        return input_dict
335816
def to_dict(self):
        
        result_dict = {}
        for column in self.__table__.columns.keys():  # pylint: disable=no-member
            value = result_dict[column] = getattr(self, column, None)
            if isinstance(value, Decimal):
                result_dict[column] = float(result_dict[column])
            elif isinstance(value, datetime.datetime):
                result_dict[column] = value.isoformat()
        return result_dict
1262084
def to_serializable_dict(self, attrs_to_serialize=None,
                             rels_to_expand=None,
                             rels_to_serialize=None,
                             key_modifications=None):
        
        return self.todict(
            attrs_to_serialize=attrs_to_serialize,
            rels_to_expand=rels_to_expand, rels_to_serialize=rels_to_serialize,
            key_modifications=key_modifications)
1154989
def to_dict(self):
        
        return dict(
            (k, self.__dict__[k]) for k in self.__dict__ if k.find("_") != 0)
1255194
def to_dict(self):
        
        result = {}
        for name in self.__dict__:
            if name.startswith("_"):
                continue

            key = name.replace("_", "-")
            attr = getattr(self, name)
            result[key] = attr.to_dict() if hasattr(attr, "to_dict") else attr

        return result
1303755
def to_dict(self):
        

        msg_dict = {}
        msg_dict['level'] = self.level
        msg_dict['message'] = self.message
        msg_dict['now_time'] = monotonic()
        msg_dict['created_time'] = self.created
        msg_dict['id'] = self.id
        msg_dict['count'] = self.count

        return msg_dict
127856
def to_dict(self):
        
        result = {}
        result["type"] = "Configurable"
        result["class"] = get_classname(self)
        result["config"] = {}
        for k in self._config:
            v = self._config[k]
            if isinstance(v, JSONObject):
                result["config"][k] = v.to_dict()
            else:
                result["config"][k] = v
        return result
1163848
def to_dict(self):
        

        data = {"model": {}}

        data["model"]["description"] = self.description
        data["model"]["entity_name"] = self.entity_name
        data["model"]["package"] = self.package
        data["model"]["resource_name"] = self.resource_name
        data["model"]["rest_name"] = self.rest_name
        data["model"]["extends"] = self.extends
        data["model"]["get"] = self.allows_get
        data["model"]["update"] = self.allows_update
        data["model"]["create"] = self.allows_create
        data["model"]["delete"] = self.allows_delete
        data["model"]["root"] = self.is_root
        data["model"]["userlabel"] = self.userlabel
        data["model"]["template"] = self.template
        data["model"]["allowed_job_commands"] = self.allowed_job_commands

        data["attributes"] = []
        for attribute in self.attributes:
            data["attributes"].append(attribute.to_dict())

        data["children"] = []
        for api in self.child_apis:
            data["children"].append(api.to_dict())

        return data
308276
def as_dict(self):
        
        return {"@module": self.__class__.__module__,
                "@class": self.__class__.__name__,
                'r': jsanitize(self.r),
                'energies': jsanitize(self.energies),
                'forces': jsanitize(self.forces),
                'structures': [s.as_dict() for s in self.structures]}
922447
def save(self):
        
        return dict(code=self.code, name=self.name, abilities=self.abilities,
                    attributes=self.attributes, info=self.info)
1275192
def to_dict(self):
        
        d = {field: getattr(self, field) for field in self._top_fields if hasattr(self, field)}

        # set values of data fields
        d['data'] = {}
        for field in self._fields:
            if hasattr(self, field):
                # base64 encode the field for transmission if necessary
                if field in self._encode_fields:
                    val = getattr(self, field)
                    if val:
                        val = cast_s(base64.b64encode(cast_b(val)))
                    d['data'][field] = val
                else:
                    d['data'][field] = getattr(self, field)

        return d