230 points · by gjvc · 4y ago · 45 comments
You could visually diff a whole lot of reports, pretty much instantly. Our PM had a paid tool that could do this, but wasn't sure what it was.
[0] https://github.com/Wilfred/difftastic [1] https://difftastic.wilfred.me.uk/languages_supported.html
Once I wrote a simple script to convert json files to `path : value\n` form; that is getting this
."a" : 1 ."b" : {} ."b"."a" : "" ."b"."c" : [] ."b"."c"[0] : true
from the json { "a": 1, "b": { "a": "", "c": [true] } }
It made better diffs but it was also harder to read.
[0] https://marketplace.visualstudio.com/items?itemName=richie5u...
https://tree-merge.com/merging-categories-4-independant-diy-...
The conclusion I came to here is that nested/indented lists are actually quite nice to visualise trees. JSON text is already a good visual UI.
Particularly this digraph() example: https://observablehq.com/@d3/visiting-a-d3-hierarchy. With a bit of modification away from the GraphViz format, the result fits straight into one of the many graph component visualization libraries like react-flow.
Also, a little meta, but I like that the github page was linked to rather than directly linking to the product's page. It lets me know upfront that this is open source something I'm dealing with. +1 to the submitter
Now, this is light years from PlantUML, but Vega abd Vega-Lite can do just about anything with JSON data. It's the most powerful textual graph description vocabulary I've ever seen, by far, but it's too verbose for my average user.
Not sure how to get rid of the enclosing PlantUML pragmas:
@startjson
{
"fruit":"Apple",
"size":"Large",
"color": ["Red", "Green"]
}
@endjson //Asciidoc follows
[plantuml]
----
@startjson
include::../path/to/fruit.json[]
@endjson
----
```Having said that I really like this new JSONCRACK a lot, now that I've played with it a little.
So how is JSON a graph? Or maybe the answer is just, No. Not generally. I'm confused by your question.