Skip to main content

A lightweight tool to convert JSON to TOON (TOML) and vice versa.

Project description

json-to-toon

json-to-toon is a simple, reliable Python library for converting data between JSON and TOON (TOML-style) formats. Install via pip install json-to-toon and import as json_to_toon. It offers clean APIs, fast conversions, and a handy CLI, making it ideal for configuration files, automation workflows, and projects needing seamless cross-format compatibility.

Installation

pip install json-to-toon

Usage

Install with pip install json-to-toon, then import with from json_to_toon import ...:

from json_to_toon import to_toon, to_json

data = {
    "title": "My Config",
    "owner": {"name": "Admin", "id": 55},
}

toon_output = to_toon(data)
print(toon_output)

# Convert TOON string back to JSON
json_output = to_json(toon_output)
print(json_output)

CLI

Use the bundled CLI to convert files by extension:

j2t input.json output.toon
j2t settings.toon output.json

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

json_to_toon-0.2.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

json_to_toon-0.2.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file json_to_toon-0.2.0.tar.gz.

File metadata

  • Download URL: json_to_toon-0.2.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for json_to_toon-0.2.0.tar.gz
Algorithm Hash digest
SHA256 52a1446f4dc313f9106b641c2ae7f9401ab4c243c908ac6bf882067624018162
MD5 eca8d06677c7b19383fa867e6f4f9c60
BLAKE2b-256 2feb5fa7c8d2d43ccb07cc0c6d0af078a3e7e86ac14bd2f18fdd7eee81e3fe23

See more details on using hashes here.

File details

Details for the file json_to_toon-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: json_to_toon-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for json_to_toon-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6678642a5c75ad0aa5a37b9ba86a40d73c5e7dd9040850fe1b450ed23a2a9f2b
MD5 855a3ea0944e55f9d0e94cb43dab5649
BLAKE2b-256 cfd463512ab3623eb341f72ab11265b2ea41163c97f77ccee1c12597a7892e29

See more details on using hashes here.

Supported by

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