v0.5.1 · 237 parsers · one static binary
Convert command output to JSON. Pipe anything into jq.
jc-rs turns the output of the commands you already run into JSON. One static binary, nothing to install alongside it. The converter below is the real parser, compiled to WebAssembly and running in your browser.
[ { "filesystem": "/dev/mapper/VolGroup00-LogVol00", "type": "ext3", "1024_blocks": 6030784, "used": 1147932, "available": 4571556, "mounted_on": "/", "capacity_percent": 21 }, { "filesystem": "proc", "type": "proc", "1024_blocks": 0, "used": 0, "available": 0, "mounted_on": "/proc", "capacity_percent": null }, { "filesystem": "sysfs", "type": "sysfs", "1024_blocks": 0, "used": 0, "available": 0, "mounted_on": "/sys", "capacity_percent": null } ]
Hover over a JSON value, or focus the JSON pane and use the Left and Right arrow keys, to highlight its source. Edits are parsed in this page by the same WebAssembly parser code that ships in the binary; jc-rs does not send pasted input to a server.
The measurement
100%
934 of 934 oracle-valid pairs drawn from the full corpus have no structural or value differences under the published JSON comparison. Checked on every commit, the number cannot quietly drift.
What the number excludes, and why it says so
A pair counts only when the reference implementation matches its own fixture under the same structural JSON comparison. Everything else is reported by category: a harness that silently skips what it cannot handle can report 100% while remaining blind to a third of the evidence.
- Tested, and matchingthe reference matches it under the comparison, so do we
- 934
- Oracle rejectthe reference does not match its own fixture here
- 9
- Unmappedthe filename resolves to no parser
- 149
- No inputexpected output ships without an input file
- 18
176 pairs reported but not tested. How this is produced
Startup is where it shows
The measured cold-start invocation takes 4 ms for jc-rs and 109 ms for jc. A loop, git hook, or run across many hosts pays that whole-process cost each time. The larger fixtures in the chart measure parsing and process overhead together. Full comparison.
make bench-vs-jc.Guides
The parser is one step in the pipeline.
Format choices, shell failure modes, and complete examples for the work around the conversion.
Browse all guides →- NDJSON vs JSON vs JSONL9 minChoose the right shape for streaming records, and see what changes in a real command-line pipeline.
- Bash, jc-rs, and jq8 minTurn human-readable command output into JSON first, then query it safely with jq.
- Native JSON or jc-rs?8 minPrefer a command's stable JSON flag when it has one; use a schema-aware parser when it does not.
Install
Five channels, all cut from the same tag. The binary is jc-rs, never jc: release archives carry a jc alias you can enable deliberately, and nothing installs it by default because it would shadow the original in PATH.
Cargo, prebuilt
$ cargo binstall jc-rsCargo, from source
$ cargo install jc-rsHomebrew
$ brew install OlegSotnikov/tap/jc-rsDocker
$ docker pull appmasterio/jc-rsnpm, WebAssembly
$ npm install jc-rs-wasmOr take a static binary from the releases: five targets, with completions for bash, zsh and fish and SHA256SUMS in every archive.
237 parsers
Every one of them has a reference page with its platforms, its magic command and a real fixture pair where the corpus has one.
System
55Hosts, processes, users, hardware
acpi chage date df du
Network
24Interfaces, routes, sockets, DNS
arp curl_head dig ethtool host
Disk
7Block devices, filesystems, arrays
blkid findmnt lsblk mdadm sfdisk
File formats
16Structured files that are not commands
csv csv_ih csv_ih_s csv_s ini
Strings
8One value in, its parts out
datetime_iso email_address jwt path path_list
Packages
11Distribution package managers and indexes
apt_cache_show apt_get_sqq debconf_show dpkg_l pacman
Logs
11Line-oriented log formats
cef cef_s clf clf_s git_log
Security
12Firewalls, certificates, permissions
certbot cksum gpg hashsum iptables
/proc
52Linux kernel interface files
proc proc_buddyinfo proc_cmdline proc_consoles proc_cpuinfo
Other
41Everything that fits nowhere else
airport airport_s amixer asciitable asciitable_m