json.dump’s picky about encoding too! If you’re getting weird chars, try:
```python
with open('file.json', 'w', encoding='utf-8') as f:
json.dump(data, f, ensure_ascii=False)
```
The `ensure_ascii=False` keeps Unicode intact.
For nested data, it *should* work—unless you’ve got circular refs (like a dict referencing itself). Then, boom. `jsonpickle` might help, but it’s overkill for most cases.
```python
with open('file.json', 'w', encoding='utf-8') as f:
json.dump(data, f, ensure_ascii=False)
```
The `ensure_ascii=False` keeps Unicode intact.
For nested data, it *should* work—unless you’ve got circular refs (like a dict referencing itself). Then, boom. `jsonpickle` might help, but it’s overkill for most cases.
