Pretty print the JSON if available (5.4+)

The YAML format is great because it shows the request in a readable form. This does the same for JSON where it's available, by pretty printing it before writing to disk.