slight modifications to Text.JSON.Pretty