ls | cat </dev/stdjson | string_proc_the_json_for_some_reason
With the direct ability to process in line:
ls -a | json.files[0].last_modified
I'd probably want multiple output formats (including s-expressions).
ls | cat </dev/stdjson | string_proc_the_json_for_some_reason
With the direct ability to process in line:
ls -a | json.files[0].last_modified
I'd probably want multiple output formats (including s-expressions).
$ ls | get 0 | select modified | to json
{ "modified": "2022-08-16 16:38:28 -04:00" }
The internal data format looks pretty JSON-like, with the added ability to keep Nushell types intact.
While I'm not ready to replace Fish with Nushell, it's definitely taken the place of jq for me.
https://unix.stackexchange.com/questions/197809/propose-addi...
I see much potential in adding stdjson as well, but I do caution against opening the floodgates to std* being implemented for every pet format and insignificant corner case.
int main(int argc, char *argv[], char *envp[], JSON *json)
for some JSON data type that is part of C, kind of analogous to a FILE stream? I'm not sure how the the json info would get into that fourth argument (has to be independent of argv), but it would keep std{in,out,err} as is.Additionally, as JSON is text, you can use awk/sed/grep and so on.
I think stdjson is insane yet awesome to ponder.
One thing that I do like about JSON is that it is ubiquitous - and that makes up for a lot of its other faults. But I would like to see proposed use cases that JSON would not support beforehand, to clearly define where the limitations are, and what limitations the community is willing to accept.