Convert object members to a dictionary that can be parsed as JSON.

        Returns:
             dict:
338363
def ToJson(self):
        
        parameters = self.ParameterList.hex()
        paramlist = [ToName(ContractParameterType.FromString(parameters[i:i + 2]).value) for i in range(0, len(parameters), 2)]
        return {
            'hash': self.ScriptHash().To0xString(),
            'script': self.Script.hex(),
            'parameters': paramlist,
            'returntype': ToName(self.ReturnType) if type(self.ReturnType) is int else ToName(int(self.ReturnType))
        }
1281638
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'level') and self.level is not None:
            _dict['level'] = self.level
        if hasattr(self, 'message') and self.message is not None:
            _dict['message'] = self.message
        return _dict
613028
def to_dict(self):
        
        return {k: v.to_dict() if isinstance(v, AttrDict) else v
                for k, v in self.__dict__.items() if not k.startswith('_')}
121359
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'model') and self.model is not None:
            _dict['model'] = self.model
        return _dict
977774
def to_dict(self):
        
        obj = super(EnumType, self).to_dict()
        obj['values'] = self.values
        return obj
1279116
def to_dict(self):
        
        obj_dict = super(Table, self).to_dict()
        rows_dict = [r.to_dict() for r in self.rows]
        child_dict = {
            'type': self.__class__.__name__,
            'caption': self.caption,
            'rows': rows_dict
        }
        obj_dict.update(child_dict)
        return obj_dict
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]}
1154989
def to_dict(self):
        
        return dict(
            (k, self.__dict__[k]) for k in self.__dict__ if k.find("_") != 0)
1079099
def dict(self):
        
        return_obj = {}
        for attr in dir(self):
            if not attr.startswith('__') and attr not in self.__reserved:
                if isinstance(getattr(self, attr), list):
                    return_val = []
                    for item in getattr(self, attr):
                        if isinstance(item, DictClass):
                            return_val.append(dict(item))
                        else:
                            return_val.append(item)
                elif isinstance(getattr(self, attr), dict):
                    return_val = {}
                    for key, item in getattr(self, attr).items():
                        if isinstance(item, DictClass):
                            return_val[key] = item.dict()
                        else:
                            return_val[key] = item
                elif isinstance(getattr(self, attr), DictClass):
                    return_val = getattr(self, attr).dict()
                else:
                    return_val = getattr(self, attr)
                return_obj[attr] = return_val
        return return_obj
1197566
def to_dict(self):
        
        output = {}
        for key, value in self.__dict__['p'].iteritems():
            if value is None or isinstance(value, SIMPLE_TYPES):
                output[key] = value
            elif hasattr(value, 'to_dot'):
                output[key] = value.to_dot()
            elif hasattr(value, 'to_dict'):
                output[key] = value.to_dict()
            elif isinstance(value, datetime.date):
                # Convert date/datetime to ms-since-epoch ("new Date()").
                ms = time.mktime(value.utctimetuple()) * 1000
                ms += getattr(value, 'microseconds', 0) / 1000
                output[key] = int(ms)
            elif isinstance(value, dict):
                output[key] = []
            else:
                raise ValueError('cannot encode ' + repr(key))

        return output
958683
def to_dict(self):
        
        org = {}
        if self._display_name:
            org["display_name"] = self._display_name
        if self._name:
            org["name"] = self._name
        if self._url:
            org["url"] = self._url
        return {"organization": org} if org else {}
26781
def to_dict(self):
        ''''''
        d = {'name': self.name}
        if self.data:
            d['data'] = self.data
        return d
117998
def to_dict(self):
        
        obj_dict = super(Cell, self).to_dict()
        child_dict = {
            'type': self.__class__.__name__,
            'header_flag': self.header_flag,
            'align': self.align,
            'wrap_slash': self.wrap_slash,
            'content': self.content.to_dict()
        }
        obj_dict.update(child_dict)
        return obj_dict
1078374
def to_dict(self):
        
        return {'schema': self.schema, 'table': self.table, 'name': self.name, 'type': self.type}
125240
def to_dict(self):
        
        return {key: val.to_dict() if isinstance(val, NestedDict) else val
                for key, val in self.items()}
366908
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'code') and self.code is not None:
            _dict['code'] = self.code
        if hasattr(self, 'description') and self.description is not None:
            _dict['description'] = self.description
        if hasattr(self, 'error_id') and self.error_id is not None:
            _dict['error_id'] = self.error_id
        return _dict
900606
def to_dict(self):
        
        out_dict = dict(self)
        for k, v in out_dict.items():
            if v is self:
                out_dict[k] = out_dict
            elif hasattr(v, 'to_dict'):
                out_dict[k] = v.to_dict()
            elif hasattr(v, 'to_list'):
                out_dict[k] = v.to_list()
        return out_dict