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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52a1446f4dc313f9106b641c2ae7f9401ab4c243c908ac6bf882067624018162
|
|
| MD5 |
eca8d06677c7b19383fa867e6f4f9c60
|
|
| BLAKE2b-256 |
2feb5fa7c8d2d43ccb07cc0c6d0af078a3e7e86ac14bd2f18fdd7eee81e3fe23
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6678642a5c75ad0aa5a37b9ba86a40d73c5e7dd9040850fe1b450ed23a2a9f2b
|
|
| MD5 |
855a3ea0944e55f9d0e94cb43dab5649
|
|
| BLAKE2b-256 |
cfd463512ab3623eb341f72ab11265b2ea41163c97f77ccee1c12597a7892e29
|