JSON to TOON Lite
A zero-dependency Python micro-tool that converts JSON into Token-Oriented Object Notation (TOON). TOON reduces LLM token usage by up to 60% by eliminating repetitive JSON keys in uniform arrays and rendering them as compact CSV-style tables.
Usage
from json_to_toon_lite import convert_json_to_toon
json_data = """
{
"location": "Berlin",
"alerts": ["frost", "wind"],
"forecast": [
{"day": "Mon", "temp": -2, "condition": "snow"},
{"day": "Tue", "temp": 1, "condition": "cloudy"}
]
}
"""
print(convert_json_to_toon(json_data))
Output: (Massive Token Savings!)
location: Berlin
alerts[2]: frost,wind
forecast[2]{day,temp,condition}:
Mon,-2,snow
Tue,1,cloudy
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_lite-0.1.0.tar.gz.
File metadata
- Download URL: json_to_toon_lite-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
917f3f58edbcf918c4bb64c040b85bfcb05e67573fc6977896c97ddbba2cb1e4
|
|
| MD5 |
d4d68f2f2f8945950241dd085f473c15
|
|
| BLAKE2b-256 |
90ba698f57f18e42e3f6bba714f4fc37b7134465e247a0cc18470331f34fefb0
|
Provenance
The following attestation bundles were made for json_to_toon_lite-0.1.0.tar.gz:
Publisher:
publish.yml on Encephos/json-to-toon-lite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
json_to_toon_lite-0.1.0.tar.gz -
Subject digest:
917f3f58edbcf918c4bb64c040b85bfcb05e67573fc6977896c97ddbba2cb1e4 - Sigstore transparency entry: 2598195363
- Sigstore integration time:
-
Permalink:
Encephos/json-to-toon-lite@23c72c3bd5eea5da176de7f3d95bf1ec5f4ee4c6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Encephos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@23c72c3bd5eea5da176de7f3d95bf1ec5f4ee4c6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file json_to_toon_lite-0.1.0-py3-none-any.whl.
File metadata
- Download URL: json_to_toon_lite-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e5748ff79f21d964100d70da9a3e3891506d5581d043f5ad218a1060c759e02
|
|
| MD5 |
7b7c63f66d5377d2ebdf6c18b28efe29
|
|
| BLAKE2b-256 |
900fe435c0f93e7933f0f529bd468321db5fcc72559629c71a3c671f3a1fdc8c
|
Provenance
The following attestation bundles were made for json_to_toon_lite-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Encephos/json-to-toon-lite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
json_to_toon_lite-0.1.0-py3-none-any.whl -
Subject digest:
9e5748ff79f21d964100d70da9a3e3891506d5581d043f5ad218a1060c759e02 - Sigstore transparency entry: 2598195484
- Sigstore integration time:
-
Permalink:
Encephos/json-to-toon-lite@23c72c3bd5eea5da176de7f3d95bf1ec5f4ee4c6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Encephos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@23c72c3bd5eea5da176de7f3d95bf1ec5f4ee4c6 -
Trigger Event:
release
-
Statement type: