prettyPrint to JSON if applicable