andreyvit / json-diff

Structural diff for JSON files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The --output-keys option not working?

laseanb opened this issue · comments

commented

First off, Thank You for your work on this tool!!!!

While using it I noticed that the -o or --output-keys option doesn't seem to work in v1.0.3 though it does work in v0.9.1. Running with the verbose option, I noticed that no matter whether I use -o or -x, the excludeKeys always got filled with the args while the outputKeys array remained empty.

ie json-diff -v --output-keys "one" <(echo '{"one":"1","two":"2","three":"3"}') <(echo '{"one":"1","two":"2","four":"4"}')

Looking at this commit (91da5ee?diff=unified), it looks like #var(outputKeys) was changed to #var(excludeKeys) which makes it so that the args passed to either -x or -o options always get funneled to excludeKeys.

Is this a bug?

commented

Hey Eric, I just created a PR: #116