top | item 32626873

JSON Crack – Visualize JSON data into graphs

576 points| iCutMoon | 3 years ago |jsoncrack.com

96 comments

order
[+] geokon|3 years ago|reply
If you indent your code manually then you can achieve something that I feel looks quite similar. So the example they give would be written as:

    {"squadName":  "Super hero squad",
     "homeTown":   "Metro City",
     "formed":     2016,
     "secretBase": "Super tower",
     "active":     true,
     "members":    [{"name":           "Molecule Man",
                     "age":            29,
                     "secretIdentity": "Dan Jukes",
                     "powers":         ["Radiation resistance",
                                        "Turning tiny",
                                        "Radiation blast"]},
                    {"name":           "Madame Uppercut",
                     "age":            39,
                     "secretIdentity": "Jane Wilson",
                     "powers":         ["Million tonne punch",
                                        "Damage resistance",
                                        "Superhuman reflexes"]},
                    {"name":           "Eternal Flame",
                     "age":            1000000,
                     "secretIdentity": "Unknown",
                     "powers":         ["Immortality",
                                        "Heat Immunity",
                                        "Inferno",
                                        "Teleportation",
                                        "Interdimensional travel"]}]}
I've been doing with Clojure/EDN data and I feel it makes it much easier to visually parse.

PS: Does anyone knows if there was an emacs mode that'd do this for me automagically?

[+] coenhyde|3 years ago|reply
If you climb to the top of a really tall mountain you'll get a similar perspective to what Google Maps provides.
[+] dotancohen|3 years ago|reply
Python formats it almost exactly like you did:

  $ python3 -m json.tool
  {
    "squadName": "Super hero squad",
    "homeTown": "Metro City",
    "formed": 2016,
    "secretBase": "Super tower",
    "active": true,
    "members": [
        {
            "name": "Molecule Man",
            "age": 29,
            "secretIdentity": "Dan Jukes",
            "powers": [
                "Radiation resistance",
                "Turning tiny",
                "Radiation blast"
            ]
        },
        {
            "name": "Madame Uppercut",
            "age": 39,
            "secretIdentity": "Jane Wilson",
            "powers": [
                "Million tonne punch",
                "Damage resistance",
                "Superhuman reflexes"
            ]
        },
        {
            "name": "Eternal Flame",
            "age": 1000000,
            "secretIdentity": "Unknown",
            "powers": [
                "Immortality",
                "Heat Immunity",
                "Inferno",
                "Teleportation",
                "Interdimensional travel"
            ]
        }
    ]
  }
[+] nerdponx|3 years ago|reply
This is how Lisp code (and S-expressions in general) is conventionally indented.
[+] bboozzoo|3 years ago|reply
Have you tried json-mode? Seems to work pretty well.
[+] KevinEldon|3 years ago|reply
Cool. PlantUML also does JSON visualization [1] if you need a local option or are hesitant to load your data onto a website.

[1] https://plantuml.com/json

[+] blooalien|3 years ago|reply
Nice! Thank you for that. Did not know that.
[+] spinaker|3 years ago|reply
The arrays are not presented correctly. Each element in the array points to the parent, rather than being grouped together. Ditto for Objects (key/value pairs).

Since JSON is just a simple tree structure without cycles, the JSON "visualization" doesn't buy you much that indented text formatting can't already give you.

[+] yieldcrv|3 years ago|reply
Note: when browsing on mobile it isn't obvious that there are examples, the tweet from github isnt obvious that it is an example and the interactive graph doesnt look like one because it zooms into blank space

although I have a desktop and do development there, my interest in a new tool is frequently is sparked by my casual browsing on mobile, there might be (many) others like me

[+] clementmas|3 years ago|reply
I scrolled down on mobile and closed the website because I couldn't see any example
[+] wruza|3 years ago|reply
Yep, my first thought was “but where are examples” and I couldn’t find any.
[+] hiccuphippo|3 years ago|reply
Once I was working with an api that used mongodb in the back. Mongo uses very large integers as ids and I was looking at the json generated through a json viewer extension in the browser. I was having problems because I couldn't find the document I was looking at in the database. Turns out, the viewer used the browser's JSON.parse and that was converting the id to a number and losing precision since it was so large. Ever since, I prefer to look at json raw first and then use formatters just to look at the shape, not the data.
[+] bilekas|3 years ago|reply
Personally I've never had a problem reading through json, I mean its designed that way to be flat and simple, but this could be brilliant for documentation, even auto updating with some schema changes etc.

Super useful for me in that way so thanks!

[+] cerved|3 years ago|reply
if it contains very large, nested objects, it can be harder to get an overview or navigate
[+] elbajo|3 years ago|reply
Ideally this is something that could run locally but it looks great thank you!

I wish these kind of projects would show up when searching "Online JSON visualization". Current SEO logic means that website like this have pretty much no chance of making it. Would love to be proven wrong though!

[+] loxias|3 years ago|reply
This looks like a neat tool, but without the ability to collapse and expand most sections, it's only useful for trivially small JSON files :/
[+] Frajedo|3 years ago|reply
Definitely the nº1 missing feature. Hope it arrives soon :)
[+] makach|3 years ago|reply
I am curious, who needs to visualise these datas? What I am interested in is validation. it's the same as with XML, or any transitional data formats, if I need to fix something I work on a specific set of the data and make sure that it is valid. If it is not I fix it. If I want to visualize data I use it at the endpoints, ie. in Excel or in PowerBI.
[+] youngNed|3 years ago|reply
this might be a good place to ask: is there any tool out there that can help with json to normalised tables?

I know that many databases can store json, but i often have api's that i would like storing in tables, and feel that 'splitting it out' should be fairly trivial.

Each time i think about making a tool, i am put off by the fact that there is a voice saying 'someone will have done this, in a much better way than you!' :-)

EDIT:

Ignore that, i did that think where i didn't look at the link - this pretty much does what i would need

[+] raxxorraxor|3 years ago|reply
If you have an MS office suite the power query editor can expand JSON to columns. Doesn't result in a table that is normalized per se, but it is quite a powerful tool overall. Not really a Microsoft fan, but what they provide here is not bad at all.
[+] awild|3 years ago|reply
Have you looked at Millercsv or jq?
[+] afandian|3 years ago|reply
There’s a message saying “incompatible device”. I’m using an iPhone.
[+] kurishutofu|3 years ago|reply
The button leads to the editor page which you can acces from the main navigation, it’s weird that the button is disabled on mobile while the editor works fine.
[+] exabyte|3 years ago|reply
Same but with Android, makes sense this would be more of a desktop experience though
[+] ssalka|3 years ago|reply
Opening on iOS I see an "Incompatible Device" notice on the page. Does the demo only work on desktop?
[+] andrew_|3 years ago|reply
Same on Android with Brave. Seems a safe assumption that mobile is an afterthought for the product.
[+] defrost|3 years ago|reply
Looks good.

Slight quibble, JSON with large value fields (eg: 4K text as a single line) blow out the containing box dimensions in the web visualiser.

Maybe there's a flag to clip | wrap such values, if so I missed ny option to toggle it.

( I used MediaInfoCLI --output=JSON on some multitrack files from handbrake, the encode argument flags are a single large value )

[+] defrost|3 years ago|reply
ADDENDUM:

There's a -><- Collapse nodes | Expand Nodes toggle on the RHS vertical toolbar of the web visual editor.

Still appears to be a slight issue with very large nodes (because of very long lines as values) scaling out of the view and being tricky to navigate into view again.

Still a handy tool for certain JSON structures for that first overview.

[+] flurly|3 years ago|reply
This is pretty awesome. I wonder how this scales. Like if I wanted to visualize a graph with millions of nodes, would it make sense to copy a whole JSON blob into it?

One of my side projects is called GraphJSON (https://graphjson.com), where we took the opposite approach. Log events (kind of like nodes in your graph) in a segment/mixpanel/amplitude way and then use SQL to stitch these events together. Currently it just does basic visualizations like lines and tables, but it'd be awesome to do the flow charts you've created. Perhaps there's opportunity for partnership?

[+] auggierose|3 years ago|reply
Having an extra box for nested fields is somewhat annoying and space wasting, I think. Can that be switched on/off? From a drawing perspective it is easier, but it seems it should be possible to do away with the extra box.
[+] loxias|3 years ago|reply
That was my first thought as well.
[+] anonu|3 years ago|reply
I've been looking for something visual like this that can generate JSON Schemas. You would be able to visit any "node", right-click, and specify the constraints you're looking to add to the schema...
[+] throwaway2016a|3 years ago|reply
Looks like a cool project and I love that it is open source.

But naming a graph visualization tool using the same word as the Microsoft Flowchart visualization tool would make me somewhat nervous since it can cause "brand confusion." Granted I can't find a trademark listed for Visio specifically (maybe the name is too generic) so may be all good.