
Ask HN: What are you favoring YAML/JSON command line tools? - wkoszek
Mine is jq. Wondering if there&#x27;s something similar I could use to <i>write</i> JSON&#x2F;YAML from the command line without a need of jumping to Vim.
======
dozzie
Why would anybody bother with jq? App::RecordStream gives much more
flexibility.

And how would you exactly _write_ JSON/YAML? You could generate some e.g. from
CSV or with split/regexp/text parsing (recs-from*), but those are specific
cases when you have some data and you want to work on it as a set on JSON
objects. It's data-centric, not format-centric.

~~~
wkoszek
jq is nice for scripting and debugging.

If you have a backend powered by JSON or YAML and you need to do some
debugging/eyeballing, writing a custom scripts... jq is there.

I guess I'll have to write my tool for this :-)

~~~
dozzie
I still see no point in using jq instead of App::RecordStream. It's not like
jq can produce JSON stream (recs-fromcsv, recs-fromdb, recs-fromsplit),
consume it (recs-tocsv, recs-totable, recs-eval), or easily summarize it
(recs-collate). All jq can do seems to fall under recs-grep and recs-xform.

------
davelnewton
cat > some_file.json

What would it mean to write JSON to a file from the command line other than
that?

~~~
wkoszek
Have a tool which understands the structure and can put certain arguments from
the command line into the correct hierarchy of JSON/YAML? Think: sed's 'i'
command for these formats basically.

