4 ms·
I’m not sure this would be the way to go, but it’d be awesome if most Unix command-line tools had a way to accept and output JSON objects.
by rbanffy 3y ago
I’m not sure this would be the way to go, but it’d be awesome if most Unix command-line tools had a way to accept and output JSON objects.
- geophile 3y agoThis is a place where marcel's python grounding is really useful. Reading json, marcel generates a stream of nested dicts and lists. That stream can be turned back to json for output. Similar for CSV.
- all2 3y agoI will note that Powershell has typed inputs and outputs and that can be very powerful. Now if it weren't so verbose...
- jen20 3y agolibxo has gone some way towards making that a reality in FreeBSD.
- mbakke 3y agoThe "tree" command will output JSON on fd3 (which it dubs 'stddata') when available. If more programs adopt that pattern we could use stdout (fd1) only for interactive programs.
- rbanffy 3y agoThis is a pretty brilliant idea. Ideally, someone from BSD-land and GNU-land should meet and come up with some sane JSON schemas.