(the only really relevant piece is that

```bash
python -m json.tool | sed 's/ *$//'"
```

reads json from stdin and writes prettified json to stdout)