Re:JSON Crack – Visualize JSON data into graphs
by bboozzoo on Sunday August 28, 2022 @08:27AM
(#32627865)
Have you tried json-mode? Seems to work pretty well.
[ Parent
| on HN ]
Re:JSON Crack – Visualize JSON data into graphs
by geokon on Sunday August 28, 2022 @08:32AM
(#32627894)
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..)
Re:JSON Crack – Visualize JSON data into graphs
by user5678 on Sunday August 28, 2022 @11:04AM
(#32628937)
gg=G in evil mode will do that.
Re:JSON Crack – Visualize JSON data into graphs
by dotancohen on Monday August 29, 2022 @07:39AM
(#32636970)
Evil (Emacs 27.1) produced this:
{
"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"
]
}
]
}
Interestingly, the first-level items are not indented. Real VIM 8.1 produced the same format, but the first-level items _are_ indented.