A modern web application that converts JSON data into TOON (Token-Oriented Object Notation) format. TOON is a human-readable, tabular format optimized for LLM prompts and data representation.
TOON (Token-Oriented Object Notation) is a format designed to be more efficient for LLM processing than traditional JSON or YAML. It features:
- Tabular representation for arrays of objects with uniform structure
- Compact syntax that reduces token usage in LLM prompts
- Human-readable format that's easy to understand
- YAML-style indentation for nested structures
Learn more about the TOON specification: https://github.com/toon-format/toon
- β¨ Real-time JSON validation with error messages
- π Instant conversion from JSON to TOON format
- π Copy to clipboard functionality
- πΎ Download as file (.toon extension)
- π Dark mode with system preference detection
- π Visitor tracking to show usage statistics
- π¨ Modern UI built with Tailwind CSS
- π± Responsive design for all screen sizes
- π§ͺ Sample data button for quick testing
- Angular 21 - Modern Angular with standalone components
- TypeScript - Type-safe development
- Tailwind CSS 4 - Utility-first styling
- RxJS - Reactive programming
- Signals - Angular's new reactive state management
- Vitest - Unit testing framework
- Node.js (v18 or higher)
- npm (v10.9.2 or higher)
- Clone the repository:
git clone https://github.com/manthanank/json-to-toon-converter.git
cd json-to-toon-converter- Install dependencies:
npm install- Start the development server:
npm start- Open your browser and navigate to
http://localhost:4200
npm run buildThe build artifacts will be stored in the dist/ directory.
- Enter JSON: Paste or type your JSON data into the input area
- Validate: The app automatically validates your JSON as you type
- Convert: Click the "Convert β" button to transform JSON to TOON
- Copy or Download: Use the "Copy" button to copy to clipboard or "Download" to save as a
.toonfile
Input JSON:
{
"users": [
{ "id": 1, "name": "Alice", "role": "admin" },
{ "id": 2, "name": "Bob", "role": "user" }
],
"tags": ["development", "production"]
}Output TOON:
users[2]{id,name,role}:
1,Alice,admin
2,Bob,user
tags[2]: development,production
npm start- Start development servernpm run build- Build for productionnpm run watch- Build and watch for changesnpm test- Run unit tests
src/
βββ app/
β βββ app.ts # Main component with conversion logic
β βββ app.html # Template
β βββ app.css # Component styles
β βββ app.routes.ts # Routing configuration
β βββ models/ # TypeScript models
β β βββ visit.model.ts
β βββ services/ # Services
β βββ track.ts # Visitor tracking service
βββ environments/ # Environment configuration
βββ styles.css # Global styles
- Real-time validation as you type
- Clear error messages for invalid JSON
- Visual feedback with red highlighting
- Handles all JSON types: objects, arrays, primitives
- Detects uniform object arrays and converts to tabular format
- Preserves nested structures with proper indentation
- Smart string quoting (only when necessary)
- Toggle between light and dark themes
- Remembers your preference in localStorage
- Respects system color scheme preference
Contributions are welcome! Please feel free to submit a Pull Request.
This project is private and not licensed for public use.