Get object as JSON serializable

        :return:
341864
def to_python(self) -> typing.List:
        
        self.clean()
        result = []
        for obj in self.media:
            if isinstance(obj, base.TelegramObject):
                obj = obj.to_python()
            result.append(obj)
        return result
488368
def to_json(self, sort_keys=False):
    
    d = self.to_json_dict()
    return json.dumps(d, sort_keys=sort_keys)
637877
def to_json_type(self):
        
        document_dict = self._json_safe(self._document)
        self._remove_keys(document_dict, self._private_fields)
        return document_dict
937656
def serialize(self):
        
        return {
            "uuid": self.uuid, "type": self.type, "instance_id": self.instance_id,
            "prepared": self.prepared, "creation_time": self.creation_time,
            "data": self.data
        }
1061734
def to_json(self):
        

        web_resp = collections.OrderedDict()

        web_resp['status_code'] = self.status_code
        web_resp['status_text'] = dict(HTTP_CODES).get(self.status_code)
        web_resp['data'] = self.data if self.data is not None else {}
        web_resp['errors'] = self.errors or []

        return web_resp
1129747
def to_json_object(self):
    """"""
    obj_dict = dict(namespace_start=self.namespace_start,
                    namespace_end=self.namespace_end)
    if self.app is not None:
      obj_dict['app'] = self.app
    return obj_dict
476749
def _as_json(self, **kwargs) -> str:
        
        return json.dumps(self, default=self._default, **kwargs)
1164383
def tojson(self):
        
        json_str = ctypes.c_char_p()
        check_call(_LIB.MXSymbolSaveToJSON(self.handle, ctypes.byref(json_str)))
        return py_str(json_str.value)
132692
def to_json(self):
        
        data = dict(self.__dict__)
        data.pop('context',None)
        data['oauth'] = self.oauth.to_dict()
        data['cache'] = self.cache.to_dict()
        return json.dumps(data)
493413
def to_JSON(self):
        
        return json.dumps({"reception_time": self._reception_time,
                           "Location": json.loads(self._location.to_JSON()),
                           "Weather": json.loads(self._weather.to_JSON())
                           })
913763
def to_json_serializable(obj):
    
    if isinstance(obj, Entity):
        return obj.to_json_dict()

    if isinstance(obj, dict):
        return {k: to_json_serializable(v) for k, v in obj.items()}
    elif isinstance(obj, (list, tuple)):
        return [to_json_serializable(v) for v in obj]
    elif isinstance(obj, datetime):
        return obj.strftime('%Y-%m-%d %H:%M:%S')
    elif isinstance(obj, date):
        return obj.strftime('%Y-%m-%d')

    return obj
807202
def serialize(objects=None):
    

    return serializers.serialize(
        "json",
        objects,
        ensure_ascii=True,
        use_natural_foreign_keys=True,
        use_natural_primary_keys=False,
    )
289173
def to_JSON(self):
        
        return json.dumps({'name': self._name,
                         'coordinates': {'lon': self._lon,
                                         'lat': self._lat
                                        },
                         'ID': self._ID,
                         'country': self._country})
722212
def encode_json(self, serializable):
        
        return json.dumps(serializable.serialize(), cls=self.encoder)
341387
def as_json(self):
        # type: () -> dict
        """"""
        self._config['applyCss'] = self.applyCss
        self._json['config'] = self._config
        return self._json
758509
def to_json(obj):
    """"""
    i = StringIO.StringIO()
    w = Writer(i, encoding='UTF-8')
    w.write_value(obj)
    return i.getvalue()
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)