Live data from Hacker News

JSON Crack – Visualize JSON data into graphs

jsoncrack.com

31–40 of 100 posts

Re: JSON Crack – Visualize JSON data into graphs

#35

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…

Have you looked at Millercsv or jq?

Re: JSON Crack – Visualize JSON data into graphs

#36
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?

Re: JSON Crack – Visualize JSON data into graphs

#37
post #36

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"]}, {"nam…

Have you tried json-mode? Seems to work pretty well.

Re: JSON Crack – Visualize JSON data into graphs

#38
post #36

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"]}, {"nam…

Have you tried json-mode? Seems to work pretty well.

The point was that the keys and values are all aligned to the same minimal column numbers :) Both `json-mode` `json-reformat` don't seem to do that (and ideally I'd like something that'd work with Clojure/EDN code..)
Post reply on HN