Ugh, datetime is the worst with python json.dumps embedded object stuff.
`default=str` is fine for quick fixes, but if you want something cleaner, try `pendulum` or `arrow` for datetime handling. They serialize nicely to strings.
Or, if you’re lazy (like me), just convert everything to dicts first with `vars()` or `.__dict__` before dumping.
Not the *most* elegant, but gets the job done.
`default=str` is fine for quick fixes, but if you want something cleaner, try `pendulum` or `arrow` for datetime handling. They serialize nicely to strings.
Or, if you’re lazy (like me), just convert everything to dicts first with `vars()` or `.__dict__` before dumping.
Not the *most* elegant, but gets the job done.
