json.dumps is like that one teacher who only accepts homework in *exactly* the right format.
For a dirty workaround, just `print(vars(your_obj))` and copy-paste into a dict. Not scalable, but gets you unstuck.
For a real solution, yeah, custom encoder or a lib like `simplejson` (handles more types out of the box).
For a dirty workaround, just `print(vars(your_obj))` and copy-paste into a dict. Not scalable, but gets you unstuck.
For a real solution, yeah, custom encoder or a lib like `simplejson` (handles more types out of the box).
