pretty print json for the docs

Not sure if this was breaking gh-pages or if something else broke it
around the same time... but having put this code together, might
as well check it in now.