Skip to main content

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:

  1. The JSON input must be a mapping (JSON object).

  2. 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


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 details)

Uploaded Source

Built Distribution

t2j-0.1.0-py2.py3-none-any.whl (3.1 kB view details)

Uploaded Python 2 Python 3

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

Hashes for t2j-0.1.0.tar.gz
Algorithm Hash digest
SHA256 593b449ee5fa6a83f816047bbc22a4c6fafd22602209cdeebb9c8ac8c285529e
MD5 158d27ad2f7dac9d7f89a30376b40329
BLAKE2b-256 ca02146a66a71eb6dc89ba2e9efa90aac01929bdba6942839ac628bc0bed7022

See more details on using hashes here.

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

Hashes for t2j-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f9168c524309954e5fcb3242045f3060fa6b7ea2fd2c51757f75f43a7a935f4a
MD5 9879f90d6f523360cef2a4627b59f467
BLAKE2b-256 e4d8cec3d0ab1e8e881a61aaf8f8967d447e2183ca101266a040c1bf364746fd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page