Allow to pipe in
Hi! Thanks for this tool.
I'd love to be able to pipe data to it.
e.g. cat file.json | jwalk
Thanks in advance, Gunar.
Hi Gunar,
You asked this nearly a year ago now, but I have a workaround I use for this.
Since the first word after pipes will be expanded as possible aliases, you can use an alias to emulate this behavior:
alias jpipewalk='cat >/tmp/test.json && jwalk /tmp/test.json'
alias jpw=jpipewalk
That way, when I have a pipe which produces json, I can just tack | jpw onto the end of it, and voilà, I have an instance of jwalk from the streamed-in data.
To handle stdin functionality really, as pipes are intended, would mean you'd have to handle UI interactions where the data has not necessarily been serialized/streamed-in, and that would be an inordinate amount of work for a utility which is really just good for off-the-cuff introspection of a dataset you're trying to make use of. So, this workaround is probably sufficient.