3 ms·
What value would a new standard pipe for JSON bring? It's already serialized text that can be sent to stdout. The real rub is getting programs to speak JSON nat
by stvltvs 3y ago
What value would a new standard pipe for JSON bring? It's already serialized text that can be sent to stdout. The real rub is getting programs to speak JSON natively.
- phkahler 3y ago>> The real rub is getting programs to speak JSON natively. You mean getting programs to ingest arbitrary data structures? OK, JSON is not arbitrary - it is limited to a certain overall format. But it can be used to serialize arbitrarily complex data structures.
- stvltvs 3y agoMeaning most Unix command line tools are line-oriented meaning input and output are expected to have a series of text records, each on its own line. Stray too far from this lingua franca and you'll need to get creative to get piped IO to work. JSON doesn't care so much about lines and doesn't necessarily represent an array of records, so it doesn't fit into this box.