News for hackers. Stuff that matters.
Re:Jo – a shell command to create JSON (2016) by mkdirp on Saturday February 05, 2022 @09:48PM (#30228828)
Combining here-string with `jq` (if you need variables), is plenty good enough. You'd need a single jq invocation.
Re:Jo – a shell command to create JSON (2016) by anamexis on Saturday February 05, 2022 @09:52PM (#30228852)
Yes, `jq` would work fine, but so would `jo`. The point is, if there is anything more than the simplest dynamic values, constructing valid JSON just with POSIX shell is a huge pain.