I just learned about this package: https://github.com/wolever/pprintpp Seems like it could be useful here.