jo logo

jo

Command-line utility to create JSON objects and arrays from shell arguments and piped input

install

jo is a command-line utility that creates JSON objects and arrays from shell arguments and standard input. It accepts key-value pairs as arguments to generate JSON objects, automatically inferring data types for strings, numbers, and booleans. For example, jo name=test n=42 active=true produces a JSON object with appropriate typing.

The tool also creates JSON arrays from piped input using the -a flag. Commands like seq 1 5 | jo -a convert line-based input into JSON array format. This makes jo particularly useful for shell scripting, data transformation pipelines, and integrating command-line tools with JSON-based APIs or configuration systems.

jo is implemented in C and available across multiple platforms including Linux distributions, macOS, FreeBSD, OpenBSD, and Windows. It includes comprehensive package manager support and passes tests on various Unix-like systems including AIX. The tool focuses specifically on JSON generation rather than parsing, filling a common gap in shell-based data processing workflows.

Installation

# via Homebrew
brew install jo
# via Ubuntu
apt-get install jo
# via Fedora
dnf install jo

Alternatives & related tools

add a badge to your README

Maintain jo? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/jo.svg)](https://www.trmn.sh/tools/jo?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/jo?utm_source=badge"><img src="https://www.trmn.sh/badge/jo.svg" alt="Featured on trmn" height="20"></a>