{"id":49583283,"url":"https://github.com/plotdb/toon","last_synced_at":"2026-05-03T21:07:26.396Z","repository":{"id":321333587,"uuid":"1085405415","full_name":"plotdb/toon","owner":"plotdb","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-29T04:38:13.000Z","size":145,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-29T05:36:11.372Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"LiveScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plotdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-29T01:58:57.000Z","updated_at":"2025-10-29T04:38:17.000Z","dependencies_parsed_at":"2025-10-29T05:36:16.608Z","dependency_job_id":"6a1e5023-fc4f-4fc0-b941-f707626a1bd2","html_url":"https://github.com/plotdb/toon","commit_stats":null,"previous_names":["plotdb/toon"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/plotdb/toon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Ftoon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Ftoon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Ftoon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Ftoon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plotdb","download_url":"https://codeload.github.com/plotdb/toon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Ftoon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32584741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-03T21:07:24.447Z","updated_at":"2026-05-03T21:07:26.379Z","avatar_url":"https://github.com/plotdb.png","language":"LiveScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @plotdb/toon\n\nA complete implementation of TOON (Token-Oriented Object Notation) encoder and decoder in LiveScript.\n\n\n## Features\n\n- Complete bidirectional JSON to TOON conversion\n- 100% test pass rate\n- 100% round-trip conversion fidelity\n- Support for all TOON formats (inline, tabular, list)\n- Full quoting rules implementation\n- Follows official TOON specification\n\n\n## Installation\n\n    npm install --save @plotdb/toon\n\n\n## Usage\n\n### Basic usage\n\n    const { encode, decode } = require('@plotdb/toon');\n\n    // Encode JSON to TOON\n    const data = {\n      id: 123,\n      name: \"Ada\",\n      tags: [\"admin\", \"dev\"],\n      items: [\n        { sku: \"A1\", qty: 2, price: 9.99 },\n        { sku: \"B2\", qty: 1, price: 14.5 }\n      ]\n    };\n\n    const toon = encode(data);\n    console.log(toon);\n    /*\n    id: 123\n    name: Ada\n    tags[2]: admin,dev\n    items[2]{sku,qty,price}:\n      A1,2,9.99\n      B2,1,14.5\n    */\n\n    // Decode TOON to JSON\n    const decoded = decode(toon);\n    console.log(JSON.stringify(decoded) === JSON.stringify(data)); // true\n\n\n## API\n\n### encode(value, options)\n\nEncode a JSON value to TOON format.\n\nParameters:\n- `value` - Any JSON-serializable value\n- `options` (optional)\n  - `indent`: Number of spaces per indentation level (default: 2)\n  - `delimiter`: Delimiter character `','` | `'\\t'` | `'|'` (default: `','`)\n  - `lengthMarker`: Whether to use `#` prefix (default: `false`)\n\nReturns: TOON format string\n\nExample:\n\n    const toon = encode({ name: \"Ada\", age: 30 });\n\n\n### decode(toonStr, options)\n\nParse a TOON format string to JSON value.\n\nParameters:\n- `toonStr` - TOON format string\n- `options` (optional)\n  - `strict`: Strict mode (reserved)\n\nReturns: Parsed JSON value\n\nExample:\n\n    const data = decode(\"name: Ada\\nage: 30\");\n\n\n### Using encoder/decoder classes\n\n    const { encoder, decoder } = require('@plotdb/toon');\n\n    // Use encoder instance with custom options\n    const enc = new encoder({ delimiter: '\\t' });\n    const toon = enc.encode(data);\n\n    // Use decoder instance\n    const dec = new decoder();\n    const json = dec.decode(toon);\n\n\n## TOON format examples\n\n### Object\n\n    id: 123\n    name: Ada\n    active: true\n\n\n### Nested object\n\n    user:\n      id: 123\n      name: Ada\n\n\n### Inline array\n\n    tags[3]: admin,ops,dev\n\n\n### Tabular array\n\n    items[3]{sku,qty,price}:\n      A1,2,9.99\n      B2,1,14.5\n      C3,5,7.25\n\n\n### List array\n\n    items[5]:\n      - 1\n      - text\n      - a: 1\n      - true\n      - null\n\n\n### Quoted strings\n\n    with_comma: \"hello, world\"\n    with_colon: \"key: value\"\n    looks_like_bool: \"true\"\n\n\n## Benefits\n\n### Token savings\n\nAccording to TOON specification, compared to JSON:\n- General data: 30-60% token reduction\n- Tabular data: up to 60%+ token reduction\n\n### Use cases\n\nSuitable for:\n- Passing data to LLMs\n- Large amounts of uniformly structured data\n- Token-cost-sensitive applications\n\nNot suitable for:\n- API responses (use JSON)\n- Database storage (use JSON)\n- Direct browser parsing (use JSON)\n\n\n## Development\n\n### Build\n\n    ./build\n\n### Testing\n\n    # Run all tests\n    npm test\n\n    # Run individual tests\n    npm run test:encoder    # Encoder tests\n    npm run test:decoder    # Decoder and round-trip tests\n    npm run test:samples    # Sample files tests\n\n    # Run example\n    npm run example\n\nTest results: All tests passed (100% success rate)\n\n\n### Project structure\n\n    .\n    ├── src/\n    │   └── index.ls              # Main implementation (~700 lines)\n    ├── dist/\n    │   ├── index.js              # Compiled JavaScript\n    │   └── index.min.js          # Minified version\n    ├── tests/                    # Test files\n    │   ├── test-encoder.js\n    │   ├── test-decoder.js\n    │   ├── test-samples.js\n    │   └── example.js\n    ├── samples/                  # Test samples\n    │   ├── simple/\n    │   ├── complex/\n    │   └── edge-cases/\n    └── llm/                      # Development documentation\n        ├── spec.md\n        ├── DEV.md\n        ├── ARCHITECTURE.md\n        └── ...\n\n\n### Documentation\n\nDevelopment documentation:\n- [llm/spec.md](llm/spec.md) - TOON format specification\n- [llm/DEV.md](llm/DEV.md) - Development guide\n- [llm/ARCHITECTURE.md](llm/ARCHITECTURE.md) - Architecture document\n- [llm/FINAL_REPORT.md](llm/FINAL_REPORT.md) - Complete implementation report\n\n\n### Technical specifications\n\n- Language: LiveScript\n- Target: Node.js\n- Compiler: LiveScript compiler\n- Lines of code: ~700 lines\n- Test coverage: 100%\n\n\n## Related links\n\n- [Official TOON specification](https://github.com/johannschopplich/toon)\n- [LiveScript official website](https://livescript.net/)\n\n\n## License\n\nMIT License\n\n\n## Author\n\nDeveloped with Claude Code by zbryikt\n\n\n---\n\nStatus: Complete and ready to use\nVersion: 0.0.1\nLast updated: 2025-10-29\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplotdb%2Ftoon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplotdb%2Ftoon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplotdb%2Ftoon/lists"}