How to properly use python json_dump_obj for custom object serialization? or Why is python json_dump_

16 Replies, 1129 Views

Lol, welcome to the club. python json_dump_obj is picky.

Quick fix: convert your object to a dict first. Like this:
```python
json.dumps(vars(your_obj))
```

If attributes are missing, they might not be in `__dict__`. Try adding `@property` decorators or manually building the dict.

Messages In This Thread



Users browsing this thread: 1 Guest(s)