GitHub - mkjt2/jsonipy

GitHub

1 min read Original article ↗

Jsonipy - CLI to convert stuff to JSON

Go from TOML, YAML, JSON5, HCL2 source formats, into JSON.

What for?

This might pair well with the powerful jq. E.g. analyze a TOML file using jq commands.

Usage

usage: jsonipy [-h] {toml,yaml,json5,hcl2}

Convert something from stdin to JSON

positional arguments:
{toml,yaml,json5,hcl2}
Source format

options:
-h, --help            show this help message and exit

Example

Convert a YAML file to JSON, print the result.

cat some.yaml | jsonipy yaml

How to install

Use pipx.

pipx install git+https://github.com/mkjt2/jsonipy.git