How to handle embedded objects with Python json.dumps? Struggling with serialization! or Python json.

14 Replies, 1646 Views

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.

---

Messages In This Thread



Users browsing this thread: 1 Guest(s)