Metadata-Version: 2.4
Name: json-to-toon-lite
Version: 0.1.0
Summary: A zero-dependency micro-tool to convert JSON strings into TOON to save LLM tokens.
Author-email: Encephos <magiltraun@gmail.com>
License: MIT
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 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

```python
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!)*
```text
location: Berlin
alerts[2]: frost,wind
forecast[2]{day,temp,condition}:
  Mon,-2,snow
  Tue,1,cloudy
```
