Linux command
jo 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
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]
说明
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.
参数
- -a
- Create array instead of object.
- -p
- Pretty print output.
- @_FILE_
- Read value from file.
- @-
- Read value from stdin.
- --help
- Display help information.
FAQ
What is the jo command used for?
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.
How do I run a basic jo example?
Run `jo name=[value] count:=[42]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a do in jo?
Create array instead of object.