Yup, `indent` is the way to go for clean json dump python output. I usually set it to 2 or 4 depending on how nested the data is.
If you’re dealing with special chars, `ensure_ascii=False` is a must. Otherwise, it’ll escape everything.
Pro tip: Check out `json.tool` from the command line. Just pipe your json into it and it’ll prettify everything. Super handy!
```bash
python -m json.tool < messy.json > clean.json
```
If you’re dealing with special chars, `ensure_ascii=False` is a must. Otherwise, it’ll escape everything.
Pro tip: Check out `json.tool` from the command line. Just pipe your json into it and it’ll prettify everything. Super handy!
```bash
python -m json.tool < messy.json > clean.json
```
