Chrome Developer Tools Response/Preview Tab "Pretty Print" or "Formatting"

Does anyone know of a tool or extension to the chrome developer tools that will take the response of a request and format it if it's XML or JSON. I've done quite a bit of looking and have not been able to find any type of tool to properly format the response tab given xml or json response text.

enter image description here


Solution 1:

In your screenshot, you just select the 'preview' tab. Works for me, anyway. Maybe you don't have the Content-Type response header set correctly?

It works if the response code is 200. (Maybe if its 2xx). I found it doesn't work if the response code is 500, though.

Solution 2:

An other way to handle this, is to right click the request in the network tab of the developers tools and select "Copy Response". Then in the console window enter the following:

var a = 

Then paste and hit enter.

Next enter the following:

a

Then hit enter again, the entire JSON response will be displayed in an expandable/collapsible form.

Solution 3:

It may be not exact one. But I watch requests and open what I need with jsonview about json.

Solution 4:

I wish Chrome would try to parse responses even when there is no Content-type header. But, luckily Firebug will. You have to use Firefox, but it's worth it when you're dealing with XML.