Re:Jo – a shell command to create JSON (2016)
by mmgutz on Saturday February 05, 2022 @05:46PM
(#30227093)
If you're going to use string literal, then
is fine as a script
[ Parent
| on HN ]
Re:Jo – a shell command to create JSON (2016)
by anamexis on Saturday February 05, 2022 @07:17PM
(#30227851)
All fun and games until you need quoting. Quoting in shell scripts is already hellish enough, but layering JSON quoting on top of that is a road to madness.
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.