cleaning up json pretty-print functionality