-
Notifications
You must be signed in to change notification settings - Fork 0
title: jc radar_quadrant: Tools radar_ring: Assess radar_position: inner created: 2026-05-22 last_updated: 2026-05-22 related: ["DataContractsScraping", "Steampipe"]
jc (JSON Convert) is a CLI tool and Python library that converts the text output of standard Unix/Linux commands into structured JSON. It eliminates the need for hand-written awk, sed, or regex parsers when consuming command output in scripts and automation pipelines.
Pipe any supported command through jc --<parser>:
ls -la | jc --ls | jq '.[].name'
ps aux | jc --ps | jq '.[] | select(.user == "root")'
netstat -an | jc --netstat | jq '.[].local_address'
dig example.com | jc --dig | jq '.answer[].data'jc also works as a Python library:
import jc
import subprocess
output = subprocess.check_output(['ls', '-la']).decode()
parsed = jc.parse('ls', output)80+ built-in parsers including: ls, ps, df, du, netstat, ifconfig, ip, iptables, dig, ping, curl, crontab, passwd, shadow, git log, git status, systemctl, uname, uptime, iostat, vmstat, top, arp, route, traceroute, ssh, sshd_conf, ini, toml, xml, yaml, and more.
Both standard (buffered, complete output) and streaming (JSON Lines/NDJSON, one object per line) variants are available for commands with continuous output.
pip install jc
# or
brew install jcjc sits in the text-to-structured-data gap: commands that predate JSON output and have no --json flag. It complements Steampipe (SQL over APIs/cloud) and trdsql (SQL over CSV/JSON files) for different layers of the data access stack. For interactive JSON exploration of the output, jnv pairs naturally as the downstream tool.
jc sits at Tools → Assess inner. Shell scripts that parse command output with awk/sed are a common source of brittleness; jc replaces that layer with a maintained, tested parser. 80+ built-in parsers cover the vast majority of standard Unix tooling. Trial gate: replacing at least one hand-written text parser in an active script or automation pipeline.