Viewing JSON

From time to time I need to examine data in JSON format. Now unformatted JSON is very hard to read, for example:

{"movies":[{"id":"770739679","title":"Captain America: The First Avenger","year":2011,"mpaa_rating":"PG-13","runtime":121,"critics_consensus":"With plenty of pulpy action, a pleasantly...","release_dates":{"theater":"2011-07-22"},"ratings":{"critics_rating":"Fresh","critics_score":71,"audience_score":96},"synopsis":"Captain America: The First Avenger will focus on the early days...","posters":{"thumbnail":"http://content9.flixster.com/movie/11/15/83/11158339_tmb.jpg","profile":"http://content9.flixster.com/movie/11/15/83/11158339_tmb.jpg","detailed":"http://content9.flixster.com/movie/11/15/83/11158339_tmb.jpg","original":"http://content9.flixster.com/movie/11/15/83/11158339_tmb.jpg"},"abridged_cast":[{"name":"Chris Evans","characters":["Captain America/Steve Rogers","Steve Rogers / Captain America","Steve Rogers/Captain America"]},{"name":"Hayley Atwell","characters":["Peggy Carter"]},{"name":"Sebastian Stan","characters":["Bucky Barnes","James Buchanan \"Bucky\" Barnes"]},{"name":"Tommy Lee Jones","characters":["Colonel Chester Phillips"]},{"name":"Hugo Weaving","characters":["Johann Schmidt/Red Skull","Johann Schmidt/The Red Skull","Red Skull"]}],"alternate_ids":{"imdb":"0458339"}}

I usually use JSON Viewer to format JSON:

{
    "movies": [
        {
            "id": "770739679",
            "title": "Captain America: The First Avenger",
            "year": 2011,
            "mpaa_rating": "PG-13",
            "runtime": 121,
            "critics_consensus": "With plenty of pulpy action...",
            "release_dates": {
                "theater": "2011-07-22"
            },
            "ratings": {
                "critics_rating": "Fresh",
                "critics_score": 71,
                "audience_score": 96
            },
            "synopsis": "Captain America: The First Avenger will focus...",
            "posters": {
                "thumbnail": "http://content9.flixster.com/movie/11/15/83/11158339_tmb.jpg",
                "profile": "http://content9.flixster.com/movie/11/15/83/11158339_tmb.jpg",
                "detailed": "http://content9.flixster.com/movie/11/15/83/11158339_tmb.jpg",
                "original": "http://content9.flixster.com/movie/11/15/83/11158339_tmb.jpg"
            },
            "abridged_cast": [
                {
                    "name": "Chris Evans",
                    "characters": [
                        "Captain America/Steve Rogers",
                        "Steve Rogers / Captain America",
                        "Steve Rogers/Captain America"
                    ]
                },
                {
                    "name": "Hayley Atwell",
                    "characters": [
                        "Peggy Carter"
                    ]
                },
                {
                    "name": "Sebastian Stan",
                    "characters": [
                        "Bucky Barnes",
                        "James Buchanan \"Bucky\" Barnes"
                    ]
                },
                {
                    "name": "Tommy Lee Jones",
                    "characters": [
                        "Colonel Chester Phillips"
                    ]
                },
                {
                    "name": "Hugo Weaving",
                    "characters": [
                        "Johann Schmidt/Red Skull",
                        "Johann Schmidt/The Red Skull",
                        "Red Skull"
                    ]
                }
            ],
            "alternate_ids": {
                "imdb": "0458339"
            }
        }
    ]
}

Much better isn't it?

JSON Viewer is great because it also shows JSON in a tree:
JSON Viewer

Now I can easily expand and collapse elements and quickly understand the structure of the data.

However there is one problem: JSON Viewer doesn't handle large files well. If I try to open 4 MB file it just freezes for few minutes and I have to kill it with Process Explorer.

Do you have the same problem too? How would you like to see the problem solved? Please answer as a comment below.

Published by Pavel Chuchuva

I help coaches to deliver group programs.

Leave a comment

Your email address will not be published. Required fields are marked *