Avatar ·

Typeerror: Object of type is not json serializable

📁 पायथन

मैं एक Person क्लास ऑब्जेक्ट को इस तरह रिकॉर्ड करने का प्रयास कर रहा हूँ:


 def   postusertojson  ( user ):
    filiname =  str  (user.fullname) +  "" ""  +  str  (user.id)
    file =  open  (Pathusers + Filename + ,  "" w "" , encoding = )
    json.dump (user, file, ensure_asci =  false )
    File.close ()

मुझे यह error मिल रही है:


Typeerror: Object of  type                      

अभी तक कोई उत्तर नहीं।

लॉग इन करें उत्तर देने के लिए

ब्लॉग