Shoutout to some really useful online JSON tools

Just a shout-out to a couple of great online JSON tools that I use quite a lot when working with new JSON files.

The short version of the post is:

  • http://json.parser.online.fr/ – pretty formats your JSON and does a bit more that makes it easy to see if the JSON is valid and will be parsed correctly
  • http://json2table.com/ – renders the JSON as a table so that you can see the data more effectively (when relevant)

Viewing JSON Files

Let’s say we have some JSON code (that I took from Sitepoint’s sample gallery for this test). So, what we have is this:

{
    "colorsArray":[{
            "colorName":"red",
            "hexValue":"#f00"
        },
        {
            "colorName":"green",
            "hexValue":"#0f0"
        },
        {
            "colorName":"blue",
            "hexValue":"#00f"
        },
        {
            "colorName":"cyan",
            "hexValue":"#0ff"
        },
        {
            "colorName":"magenta",
            "hexValue":"#f0f"
        },
        {
            "colorName":"yellow",
            "hexValue":"#ff0"
        },
        {
            "colorName":"black",
            "hexValue":"#000"
        }
    ]
}

It shows you what you paste, a tree structure for the objects and also what it becomes after it’s evaluated in Javascript. The menu on top has additional options that can be configured.

Especially for tables

If your data is naturally well-suited for being visualized as a table, then the first site doesn’t go far enough. That’s where http://json2table.com/ comes in. It does just that – takes your data and renders it into a table. It also does render the tree if you need it.

comments powered by Disqus