Installation
The library is a single Python file with no external dependencies beyond Python’s standard library:Quick Start
Simple Conversion
The easiest way to convert files is using theBidirectionalConverter class:
Encoding JSON to TOON
For direct encoding of Python objects to TOON format:Decoding TOON to Python
For parsing TOON format into Python objects:Core Components
The library provides three main classes:- BidirectionalConverter - High-level file converter with automatic direction detection
- TOONEncoder - Converts Python objects to TOON format strings
- TOONParser - Parses TOON format strings into Python objects
- EncodeOptions - Controls JSON → TOON encoding behavior
- DecodeOptions - Controls TOON → JSON decoding behavior
Working with Options
Next Steps
- Learn about the BidirectionalConverter for file-based conversions
- Use TOONEncoder for direct object encoding
- Use TOONParser for parsing TOON strings
- Configure behavior with Options