¿Programa para formatear automáticamente las respuestas JSON?

Just wondering if theres a program you can paste a JSON response into and it will be auto-formatted? Im finding it very annoying to try and sift through these in the browser to figure out the data structure.

Hopefully this isn't too asinine of me to ask... :s

preguntado el 01 de febrero de 12 a las 03:02

4 Respuestas

Respondido 01 Feb 12, 07:02

Puede usar el JSONLint which will also validate your JSON.

Another alternative I find useful is to output a <pre> tag prior to your json, or set the headers of your page to output JSON (e.g. PHP: header('Content-type: application/json');).

Respondido 01 Feb 12, 19:02

If you're viewing it in a browser you can use something like this to have it pretty-printed in the browser itself: https://chrome.google.com/webstore/detail/chklaanhfefbnpoihckbnefhakgolnmc

There's one for Firefox too.

Respondido 01 Feb 12, 07:02

There is another question that deals with that particularly for the browser: Browser JSON Plugins

contestado el 23 de mayo de 17 a las 14:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.