Metadata-Version: 2.1
Name: t2j
Version: 0.1.0
Summary: t2j converts TOML input to JSON output and vice versa.
Author-email: "Eugene M. Kim" <astralblue@gmail.com>
Requires-Python: ~=3.3
Description-Content-Type: text/x-rst
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Utilities
Requires-Dist: tomli>=2
Requires-Dist: tomli_w>=1
Project-URL: Home, https://github.com/astralblue/t2j

===
t2j
===

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