1

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

RyanJP
  • 277
  • 1
  • 3
  • 15

4 Answers4

2

http://jsonformatter.curiousconcept.com/

sblom
  • 26,911
  • 4
  • 71
  • 95
2

You can use 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');).

sgb
  • 2,234
  • 2
  • 19
  • 31
1

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.

Daniel
  • 1,326
  • 12
  • 16
0

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

Community
  • 1
  • 1
Besi
  • 22,579
  • 24
  • 131
  • 223