Ugh, I feel your pain. json.dumps is like that one friend who only eats plain pizza.
Pro tip: Check out the `dataclasses` module if you’re on Python 3.7+. `@dataclass` objects play nice with json.dumps if you use `asdict()` from the `dataclass` module first.
Example:
```python
from dataclasses import asdict
json.dumps(asdict(your_dataclass_obj))
```
Life-changer.
Pro tip: Check out the `dataclasses` module if you’re on Python 3.7+. `@dataclass` objects play nice with json.dumps if you use `asdict()` from the `dataclass` module first.
Example:
```python
from dataclasses import asdict
json.dumps(asdict(your_dataclass_obj))
```
Life-changer.
