6 ms·
I'm probably missing something obvious, but diff seems to be handling this just fine? # diff -u <(echo '[{"a": "b"}, {"c": "d"}, {"e": "f"}]' | jq) <(echo
by eequah9L 2y ago
I'm probably missing something obvious, but diff seems to be handling this just fine?
# diff -u <(echo '[{"a": "b"}, {"c": "d"}, {"e": "f"}]' | jq) <(echo '[{"a": "b"}, {"e": "f"}]' | jq)
--- /dev/fd/63 2024-09-09 16:31:23.376841575 +0200
+++ /dev/fd/62 2024-09-09 16:31:23.376841575 +0200
@@ -3,9 +3,6 @@
"a": "b"
},
{
- "c": "d"
- },
- {
"e": "f"
}
]
- josephburnett 2y agoYeah that works. But I also wanted the ability to produce JSON Patch and JSON Merge Patch formats. And to support set semantics, identifying objects by specified keys. And it works on YAML too.