Typeerror: Object of type is not json serializable
📁 python
I am trying to record a Person class object like this:
def postusertojson ( user ): filiname = str span> (user.fullname) + "" "" + + str (user.id) file = open (Pathusers + Filename + , "" w "" , encoding = ) r json.dump (user, file, ensure_asci = false ) File.close () pre> I get an error:
typeerror: Object of type 'person' is not json serializable how to record in Json object of class?
How then to the right to derielorize it?
Ответов пока нет.
Войдите чтобы оставить ответ
Блоги