jo
TLDR
Create JSON object
$ jo name=[value] count:=[42]
Create JSON array$ jo -a [item1] [item2] [item3]
Nested objects$ jo name=[test] config=$(jo debug:=[true])
Read from stdin$ echo "[value]" | jo name=@-
Read from file$ jo content=@[file.txt]
Pretty print$ jo -p name=[value]
SYNOPSIS
jo [options] [key=value...]
DESCRIPTION
jo creates JSON from shell arguments. It builds objects and arrays from command-line key-value pairs.
The tool enables JSON generation in shell scripts. Type hints distinguish strings from numbers and booleans.
jo generates JSON from shell.
PARAMETERS
KEY=VALUE
String value assignment.KEY:=VALUE
Non-string value (number, boolean, null).-a
Create array instead of object.-p
Pretty print output.@FILE
Read value from file.@-
Read value from stdin.--help
Display help information.
CAVEATS
Shell quoting important. Use := for non-strings. Nested structures via subshell.
HISTORY
jo was created by Jan-Piet Mens to simplify JSON creation in shell scripts without complex quoting.


