t2j converts TOML input to JSON output and vice versa.
Project description
t2j converts TOML input to JSON output and vice versa.
Usage
Feed the TOML contents via standard input:
cat pyproject.toml | t2j | jq -r '.project.dependencies[]'
Specifying the filename has the same effect:
t2j pyproject.toml | jq -r '.project.dependencies[]'
Reverse Direction (JSON-to-TOML)
Invoke as j2t option for reverse (JSON-to-TOML) conversion:
t2j pyproject.toml | j2t
Note:
The JSON input must be a mapping (JSON object).
Round-trip formatting is not preserved, e.g. keys and tables may be reordered, comments are dropped, etc.
Conversion direction may also be given as -J/--json-to-toml or -T/--toml-to-json. These options override the direction implied by the command name, e.g. t2j -J is the same as j2t.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
t2j-0.1.0.tar.gz
(4.5 kB
view hashes)