v0.3.0
jz makes JSON from more than command output: from data files (CSV, TSV,
LTSV, JSON Lines, JSON and YAML, also gzip or bzip2 compressed) and from
arguments given to jz new. The registry is unchanged at 224 commands
and 596 definitions.
Added
jz newmakes a JSON object from its arguments, or an array with
--array:key=textis a string,key:=jsona JSON value,
key=@patha file's text,key:=@paththe value a data file holds and
key[]=one more element of an array. Nothing is guessed from a value,
and a key given twice without[]is exit 2.- Data files:
jz --filereads a file as the format its extension
names,.csv,.tsv,.ltsv,.jsonl(or.ndjson),.jsonand
.yaml(or.yml), each also compressed as.gzor.bz2, and
--format NAMEreads piped data as that format. JSON keeps its key
order and number literals, YAML is typed by the 1.2 core schema, and a
key given twice, text that is not UTF-8 or a value JSON cannot hold is
exit 3 with the line.--streamwrites JSON Lines and LTSV records as
they are read.--explainsays which format was read and what named
it, and--explain=jsoncounts the values inread.values. - The site has a Cookbook
of 20 tasks, each run by the end-to-end suite, and a test fails when a
documented command, the options block, the exit-code table or a demo
tape no longer matches the command line.
Changed
- A file given with
--filewhose extension names a data format is read
as that format, where its text was detected as command output. Name
--parseror--defineto read such a file as a command's output;
a file with any other extension (captured.txt) is detected as before.