LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

oq

Portable jq wrapper with XML and YAML support

TLDR

Query JSON (same as jq)
$ oq '.[0]' [file.json]
copy
Convert YAML to JSON
$ oq -i yaml '.' [file.yaml]
copy
Query XML and output as YAML
$ oq -i xml -o yaml '.root.element' [file.xml]
copy

SYNOPSIS

oq [options] filter [file]

DESCRIPTION

oq is a performant, portable jq wrapper that adds support for consuming and outputting formats beyond JSON, including XML and YAML. All jq filters work as expected — oq handles format conversion on input and output transparently.

PARAMETERS

-i FORMAT

Input format (json, yaml, xml). Default: json.
-o FORMAT
Output format (json, yaml, xml). Default: json.
--xml-root NAME
Root element name when transcoding to XML. Default: root.
--indent N
Number of spaces per indentation level (default: 2).
--tab
Use tabs instead of spaces for indentation.
-h, --help
Display help. All other arguments are passed through to jq.

INSTALL

sudo apk add oq
copy
brew install oq
copy
nix profile install nixpkgs#oq
copy

CAVEATS

Requires jq to be installed. XML-to-JSON conversion follows specific mapping rules that may not preserve all XML semantics.

HISTORY

oq was created by Blacksmoke16 and is written in Crystal.

SEE ALSO

jq(1), yq(1), xq(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid