Let's face it, currently, the most used formats for transactions and sending information among systems are JSON and XML. From my personal perspective JSON is a better option when we need to use REST services, because:

JSON is a lighter format.

Most of the times we consume REST services from client-side -JavaScript-, using AJAX calls.

Old and modern browsers can parse and transform JSON objects into JavaScript object with almost no work from our side.

The problem

But... sometimes, we need to use XML format and many times we download the XML responses to our local environment to understand its structure, and here is the little problem, browsers don't format XML when we download a response. Let's see an example: