bazaarvoice / jolt

JSON to JSON transformation library written in Java.
Apache License 2.0
1.56k stars 329 forks source link

Jolt Diffy subcommand doesn't support file descriptors #81

Open jonaf opened 10 years ago

jonaf commented 10 years ago

Normal diff utility supports the use of file descriptors as inputs, but this doesn't work with Jolt Diffy:

Old school diff:

diff <(cat myfile) <(some-script.sh)

Diffy:

jolt diffy <(curl http://www.example.com/file.json) <(some-script-that-outputs-json.sh)

If you have at least one file, @milosimpson and @snkinard noted that stdin can be used to diff against a file as a workaround, although this syntax feels a little awkward:

curl -s http://www.example.com/file.json | jolt diffy some-file.json

Of course, it still doesn't work for the case where you want to use two file descriptors.

ohhatiya commented 9 years ago

Thanks for the stdin workaround, just made use of it. :metal: