https://blog.tedivm.com/open-source/2017/05/introducing-json...
Show HN: Catj – A new way to display JSON files
21–30 of 127 posts
Re: Show HN: Catj – A new way to display JSON files
#22Re: Show HN: Catj – A new way to display JSON files
#23Re: Show HN: Catj – A new way to display JSON files
#24Re: Show HN: Catj – A new way to display JSON files
#25Have you seen gron[0]? It's similar: flattens JSON documents to make them easily greppable. But it also can revert (ie, ungron) so you can pipe json to gron, grep -v to remove some data, then ungron to get it back to json. [0] https://github.com/tomnomnom/gron
Re: Show HN: Catj – A new way to display JSON files
#26Earlier quoted context omitted.
Your opinion is bad.
json will be mocked in a few years by the same people that today mock xml. In the end, unix always survives.
Re: Show HN: Catj – A new way to display JSON files
#27this is not merely a display, it is really a sanitation of the brain-damaged json syntax.
Re: Show HN: Catj – A new way to display JSON files
#28Re: Show HN: Catj – A new way to display JSON files
#29I was curious if this could be doable with jq, and apparently it is: jq -j ' [ [ paths(scalars) | map( if type == "number" then "[" + tostring + "]" else "." + . end ) | join("") ], [ .. | select(scalars) | @json ] ] | transpose | map(join(" = ") + "\n") | join("") ' EDIT: Got the string quoting and escaping. EDIT 2: For those who want to save this script, you can put just the jq code in an executable file with the s…
Re: Show HN: Catj – A new way to display JSON files
#30https://github.com/twpayne/flatjson
The flat format is great for diffs:
--- testdata/a.json
+++ testdata/b.json
@@ -1,5 +1,6 @@
root = {};
root.menu = {};
+root.menu.disabled = true;
root.menu.id = "file";
root.menu.popup = {};
root.menu.popup.menuitem = [];
@@ -9,8 +10,5 @@
root.menu.popup.menuitem[1] = {};
root.menu.popup.menuitem[1].onclick = "OpenDoc()";
root.menu.popup.menuitem[1].value = "Open";
-root.menu.popup.menuitem[2] = {};
-root.menu.popup.menuitem[2].onclick = "CloseDoc()";
-root.menu.popup.menuitem[2].value = "Close";
-root.menu.value = "File";
+root.menu.value = "File menu";