josephburnett / jd

JSON diff and patch
MIT License
826 stars 38 forks source link

Support mutli-document YAML files #43

Open Wikiwix opened 2 years ago

Wikiwix commented 2 years ago

For YAMLs it would be great to be able to compare mutli-document files.

For JSON potentially ndjson could be supported, too.

josephburnett commented 2 years ago

This is an interesting idea. How do you imagine this would look like on the commandline? And how would it treat the order of the documents with the A and B inputs?

I suppose we could just read a multi-document file (YAML or JSON) and push that into a jsonArray time. Then we can let the user supply keys to match up documents (existing feature).

Wikiwix commented 2 years ago

Sounds good to me, the list should per default handled as multiset (-mset) though, because the YAML documents do not have an order, but "repetitions" matter