Get object as JSON serializable

        :return:
193536
def to_python(self) -> typing.Dict:
        
        self.clean()
        result = {}
        for name, value in self.values.items():
            if name in self.props:
                value = self.props[name].export(self)
            if isinstance(value, TelegramObject):
                value = value.to_python()
            if isinstance(value, LazyProxy):
                value = str(value)
            result[self.props_aliases.get(name, name)] = value
        return result
570669
def to_JSON(self):
        
        return json.dumps({'id': self.id,
                           'external_id': self.external_id,
                           'name': self.name,
                           'created_at': timeformatutils.to_ISO8601(self.created_at),
                           'updated_at': timeformatutils.to_ISO8601(self.updated_at),
                           'lat': self.lat,
                           'lon': self.lon,
                           'alt': self.alt if self.alt is not None else 'None',
                           'rank': self.rank})
538748
def get_serializable_dict(self):
        
        tmp = self.get_dict()
        tmp['date_download'] = str(tmp['date_download'])
        tmp['date_modify'] = str(tmp['date_modify'])
        tmp['date_publish'] = str(tmp['date_publish'])
        return tmp
726170
def to_json(self, indent=None, sort_keys=True):
        
        return json.dumps(self.to_dict(), indent=indent, sort_keys=sort_keys)
722212
def encode_json(self, serializable):
        
        return json.dumps(serializable.serialize(), cls=self.encoder)
657407
def json_serial(obj):
        

        if isinstance(obj, (datetime.datetime, datetime.date)):
            return obj.isoformat()

        raise TypeError('Type {} not serializable.'.format(type(obj)))
434460
def to_json(self):
        
        endpoints = []
        for endpoint in self.endpoints:
            list_fields = endpoint.fields
            resource_type = endpoint.Meta.resource_type
            table = endpoint.Meta.table

            data = endpoint.to_dict()
            data['fields'] = resource_type.get_type_of_fields(
                list_fields,
                table,
            )
            endpoints.append(data)

        data = {
            'title': self.title,
            'endpoints': sorted(endpoints, key=lambda x: x['name']),
        }

        return json.dumps(data)
419877
def as_json(obj: JsonObj, indent: Optional[str]='   ', **kwargs) -> str:
    
    return obj._as_json_dumps(indent, **kwargs)
1371785
def to_JSON(self):
        
        return json.dumps({"reference_time": self._reference_time,
                           "location": json.loads(self._location.to_JSON()),
                           "value": self._value,
                           "reception_time": self._reception_time,
                           })
1167067
def export_as_json(self):
        
        result = {
            "subscription": self.subscription,
        }

        if self.name:
            result["name"] = self.name

        if self.ask is not None:
            result["ask"] = self.ask

        if self.approved:
            result["approved"] = self.approved

        if self.groups:
            result["groups"] = sorted(self.groups)

        return result
245503
def object_to_json(obj):
    """"""
    if isinstance(obj, (datetime.datetime, datetime.date, datetime.time)):
        return obj.isoformat()
    return str(obj)
204830
def json(self):
        
        return {
            'name': self.name,
            'message': self.message,
            'description': self.description,
            'reference_url': self.reference_url,
            'tags': self.tags,
        }
1010052
def to_json(self):
    
    return {self.NAMESPACE_RANGE_PARAM: self.ns_range.to_json_object(),
            self.BATCH_SIZE_PARAM: self._batch_size}
1223100
def to_json(self):
        

        result = {
            'name': self.name,
            'id': self._real_id(),
            'type': self.type,
            'localized': self.localized,
            'omitted': self.omitted,
            'required': self.required,
            'disabled': self.disabled,
            'validations': [v.to_json() for v in self.validations]
        }

        if self.type == 'Array':
            result['items'] = self.items

        if self.type == 'Link':
            result['linkType'] = self.link_type

        return result
924130
def json(self, **kwargs):
        '''
        
        '''
        body = self._decompress(self.encoding)
        return _json.loads(body, **kwargs)
907912
def to_json(self):
        
        data = dict()

        for key, value in self.__dict__.items():
            if value:
                if hasattr(value, 'to_dict'):
                    data[key] = value.to_dict()
                elif isinstance(value, datetime):
                    data[key] = value.strftime('%Y-%m-%d %H:%M:%S')
                else:
                    data[key] = value

        return json.dumps(data)
18276
def tojson(self) -> str:
        
        return json.dumps({
            'event_id': str(self.id),
            'event_type': self.type,
            'schema_name': self.schema_name,
            'table_name': self.table_name,
            'row_id': self.row_id
        })