Skip to main content

Requirements

TOON JSON Converter is a single Python file that requires:
  • Python 3.10+ (uses modern type hints like list[str] and pattern matching)
  • No external dependencies - uses only Python standard library

Download

Since TOON JSON Converter is a standalone Python script, installation is simple:
1

Download the script

Download toon_json_converter.py from the repository and place it in your project directory or a location in your PATH.
2

Make it executable (optional)

On Unix-like systems, you can make the script executable:
chmod +x toon_json_converter.py
3

Verify installation

Check that Python can run the script:
python toon_json_converter.py
You should see the usage information:
Bidirectional TOON ↔ JSON/JSONL Converter

Usage: python toon_json_converter.py <input> [output] [options]

Automatic direction detection:
  .json file      → .toon file
  .jsonl file     → folder of .toon files
  .toon file      → .json file
  folder of .toon → .jsonl file

Usage as a Module

You can also import and use the converter programmatically in your Python code:
from toon_json_converter import BidirectionalConverter, EncodeOptions, DecodeOptions

# Create a converter instance
converter = BidirectionalConverter()

# Convert files
converter.convert_file("data.json", "data.toon")

Next Steps

Quick Start

Get up and running with your first conversion

CLI Options

Learn about encoding and decoding options

Build docs developers (and LLMs) love