JSON stats

JSON stats feature. TODO:

- [ ] update docs (readme/changelog)