Monthly Archives: July 2016

What is Wrong with JSON Viewer on Codeplex

JSON Viewer for Windows (hosted on Codeplex) is a great tool, I use it at least once a week. However it hasn’t been updated since 2011:

Here is the list of issues with version 1.2 of JSON Viewer.

1. When you open a large JSON file (more than 10 MB) the viewer freezes for 2-3 minutes, sometimes longer. You have to kill it with Task Manager.

2. When you edit JSON the cursor always jumps to the beginning of the file – very annoying. Making any changes to JSON is essentially impossible.

3. The URLs in JSON look like hyperlinks but clicking on them does nothing:

4. When you press Ctrl+V in the search field the text gets pasted to the JSON document instead, usually making it invalid!

Did I miss anything?

How to View Large JSON Files on Windows

Let’s say you need to view a huge (more than 1 GB) JSON file. Of course you are not going to view so much data, it’s humanly impossible. What you want to do is to get a general understanding of JSON structure.

I assume that JSON document is already properly formatted.

First of all we will copy first 10,000 lines to a new file. We will user PowerShell for that:

Get-Content large.json -TotalCount 10000 | Out-File truncated.json

Next, open truncated.json in Sublime Text Editor and scroll to the end:

The JSON is not valid right now. Let’s make it valid by closing all ‘[‘ and ‘{‘ brackets. Sublime Text has a great feature that highlights invalid JSON code:

All you need to do is to try to add brackets alternating between ‘[‘ and ‘{‘ until you reach the first column:

Now you can save the file and open it in JSON Viewer. Since the new file is small you should have no problems viewing it as tree:

By the way, I’m thinking of building a tool that would automate this process – leave a comment if you’re interested in learning more.

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":"","profile":"","detailed":"","original":""},"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": "",
                "profile": "",
                "detailed": "",
                "original": ""
            "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.