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
Built Distribution
File details
Details for the file t2j-0.1.0.tar.gz
.
File metadata
- Download URL: t2j-0.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.27.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 593b449ee5fa6a83f816047bbc22a4c6fafd22602209cdeebb9c8ac8c285529e |
|
MD5 | 158d27ad2f7dac9d7f89a30376b40329 |
|
BLAKE2b-256 | ca02146a66a71eb6dc89ba2e9efa90aac01929bdba6942839ac628bc0bed7022 |
File details
Details for the file t2j-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: t2j-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.27.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9168c524309954e5fcb3242045f3060fa6b7ea2fd2c51757f75f43a7a935f4a |
|
MD5 | 9879f90d6f523360cef2a4627b59f467 |
|
BLAKE2b-256 | e4d8cec3d0ab1e8e881a61aaf8f8967d447e2183ca101266a040c1bf364746fd |