Does anyone know a good free Json viewer for mac? I just want to be able to see the data organised a bit better then one long piece of text
You could use this add-on for Firefox : JSONView
Normally when encountering a JSON document (content type "application/json"), Firefox simply prompts you to download the file. With the JSONView extension, JSON documents are shown in the browser similar to how XML documents are shown. The document is formatted, highlighted, and arrays and objects can be collapsed. Even if the JSON document contains errors, JSONView will still show the raw text.
jsonpretty for pretty-printing JSON at the command line.
sudo gem install jsonpretty
If all you need is to be able to paste in text and see it prettily formatted with some basic "roll-up" functionality, try http://json.parser.online.fr/.
Update: While trying out Olivier's new beta I responded to a feedback prompt, noting the lack of "roll-up" behavior for unnamed objects and arrays. He emailed me the next morning to say that he'd gone ahead and implemented that right away. Awesome!
You can use Jason as an offline app: http://www.macupdate.com/app/mac/35588/jason
If you want a JSON QuickLook viewer integrated into the Finder, you can try quick look JSON.
My favourite way to do this (on the commandline) is to define a "pretty printing" alias,
alias pp="python -mjson.tool | pygmentize -l js"
Then you can just
cat file.json | pp
If the file is big, pipe this through
-R allows colouring sequences to pass through unescaped (raw).
The only dependency for this is python (
json.tool is in the python standard library) and
pygments. If you don't want colour coding you can leave the
| pygmentize ... bit out.
If you use TextMate, there is a / are JSON.tmbundles available, such as this one.
If you don't mind check hitting the web, check out JSONLint.
It validates and makes your JSON "pretty". You may want to consider other solutions for larger documents as this is not really scalable.