<div dir="ltr">I don't think there are any "one-shot" alternatives to that. And even jsondiff would say the files are different even if they are essentially the same but the objects are in a different order.<div><br></div><div>For example, jsondiff (the site) says that </div><div>    [{"a": "b", "b": "a"},{ "value": 1, "name": "x"}] </div><div>and </div><div>    [{"name": "x", "value": 1},{"a": "b", "b": "a"}]</div><div><br></div><div>are different. Depending on your point of view, they are the same.</div><div><br></div><div>If you don't care about the order of the objects nor the order of the properties, you will have to write your own comparator.</div><div><br><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mauro<br><a href="https://www.maurosouza.com" target="_blank">https://www.maurosouza.com</a> - registered Linux User: 294521<br>Scripture is both history, and a love letter from God.</div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em seg., 6 de dez. de 2021 às 17:48, William Park via talk <<a href="mailto:talk@gtalug.org">talk@gtalug.org</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I know of "xmldiff" and "jsondiff" to compare XML or JSON files.  But, <br>
they don't allow me to exclude certain node or keyword.  Do you know any <br>
command line program that does that, in one-shot?<br>
<br>
If not, then I have to resort to<br>
     1. For JSON, use 'jq' to remove keyword, and then compare.<br>
     2. For XML, use 'xmlstarlet' to remove node, and then compare.<br>
<br>
--William<br>
---<br>
Post to this mailing list <a href="mailto:talk@gtalug.org" target="_blank">talk@gtalug.org</a><br>
Unsubscribe from this mailing list <a href="https://gtalug.org/mailman/listinfo/talk" rel="noreferrer" target="_blank">https://gtalug.org/mailman/listinfo/talk</a><br>
</blockquote></div>