Been down this rabbit hole too.
If you're using Pydantic models, they have built-in `.json()` methods that Just Work™.
Otherwise, `orjson` (fast + handles datetimes natively) or `json_tricks` might save you some pain with Python json.dumps embedded object woes.
---
If you're using Pydantic models, they have built-in `.json()` methods that Just Work™.
Otherwise, `orjson` (fast + handles datetimes natively) or `json_tricks` might save you some pain with Python json.dumps embedded object woes.
---
