{"id":39903845,"url":"https://github.com/taichi-ishitani/rbtoon","last_synced_at":"2026-01-18T15:32:46.872Z","repository":{"id":330243396,"uuid":"1121801845","full_name":"taichi-ishitani/rbtoon","owner":"taichi-ishitani","description":"Toon decoder for Ruby","archived":false,"fork":false,"pushed_at":"2026-01-10T13:08:05.000Z","size":103,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-11T01:33:14.157Z","etag":null,"topics":["ruby","toon"],"latest_commit_sha":null,"homepage":"https://taichi-ishitani.github.io/rbtoon/","language":"Ruby","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/taichi-ishitani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-12-23T15:21:53.000Z","updated_at":"2026-01-10T22:53:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/taichi-ishitani/rbtoon","commit_stats":null,"previous_names":["taichi-ishitani/toonrb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/taichi-ishitani/rbtoon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-ishitani%2Frbtoon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-ishitani%2Frbtoon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-ishitani%2Frbtoon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-ishitani%2Frbtoon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taichi-ishitani","download_url":"https://codeload.github.com/taichi-ishitani/rbtoon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-ishitani%2Frbtoon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28539228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T14:59:57.589Z","status":"ssl_error","status_checked_at":"2026-01-18T14:59:46.540Z","response_time":98,"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":["ruby","toon"],"created_at":"2026-01-18T15:32:46.212Z","updated_at":"2026-01-18T15:32:46.866Z","avatar_url":"https://github.com/taichi-ishitani.png","language":"Ruby","funding_links":["https://ko-fi.com/A0A231E3I"],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/rbtoon.svg)](https://badge.fury.io/rb/rbtoon)\n[![Regression](https://github.com/taichi-ishitani/rbtoon/actions/workflows/regression.yml/badge.svg)](https://github.com/taichi-ishitani/rbtoon/actions/workflows/regression.yml)\n[![codecov](https://codecov.io/gh/taichi-ishitani/rbtoon/graph/badge.svg?token=P35M7RTL3W)](https://codecov.io/gh/taichi-ishitani/rbtoon)\n\n[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/A0A231E3I)\n\n# RbToon\n\n[Toon](https://toonformat.dev) is a structural text format optimized for LLM input.\nRbToon is a Racc-based decoder gem that decodes Toon input into Ruby objects.\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n```bash\nbundle add rbtoon\n```\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n```bash\ngem install rbtoon\n```\n\n## Usage\n\nYou can use the methods below to decode Toon into Ruby objects.\n\n* Decode the given Toon string\n    * `RbToon.decode`\n* Decode the Toon string read from the given file path\n    * `RbToon.decode_file`\n\nAll hash keys are symbolized when the `symbolize_names` option is set to `true`.\n\n```ruby\nrequire 'rbtoon'\n\ntoon = RbToon.decode(\u003c\u003c~'TOON', symbolize_names: true)\n  context:\n    task: Our favorite hikes together\n    location: Boulder\n    season: spring_2025\n  friends[3]: ana,luis,sam\n  hikes[3]{id,name,distanceKm,elevationGain,companion,wasSunny}:\n    1,Blue Lake Trail,7.5,320,ana,true\n    2,Ridge Overlook,9.2,540,luis,false\n    3,Wildflower Loop,5.1,180,sam,true\nTOON\n\n# output\n# {context: {task: \"Our favorite hikes together\", location: \"Boulder\", season: \"spring_2025\"},\n#  friends: [\"ana\", \"luis\", \"sam\"],\n#  hikes:\n#   [{id: 1, name: \"Blue Lake Trail\", distanceKm: 7.5, elevationGain: 320, companion: \"ana\", wasSunny: true},\n#    {id: 2, name: \"Ridge Overlook\", distanceKm: 9.2, elevationGain: 540, companion: \"luis\", wasSunny: false},\n#    {id: 3, name: \"Wildflower Loop\", distanceKm: 5.1, elevationGain: 180, companion: \"sam\", wasSunny: true}]}\n```\n\nThe `RbToon::ParseError` exception is raised if the given Toon includes errors listed in [here](https://github.com/toon-format/spec/blob/main/SPEC.md#14-strict-mode-errors-and-diagnostics-authoritative-checklist).\n\n```ruby\nbegin\n  RbToon.decode(\u003c\u003c~'TOON')\n    freends[4]: ana,Luis,sam\n  TOON\nrescue RbToon::ParseError =\u003e e\n  puts e\nend\n\n# output\n# expected 4 array items, but got 3 -- filename: unknown line: 1 column: 8\n```\n\nFor more details about APIs, please visit the [documentation page](https://taichi-ishitani.github.io/rbtoon/).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/taichi-ishitani/rbtoon.\n\n* [Issue Tracker](https://github.com/taichi-ishitani/rbtoon/issues)\n* [Pull Request](https://github.com/taichi-ishitani/rbtoon/pulls)\n* [Discussion](https://github.com/taichi-ishitani/rbtoon/discussions)\n\n## License\n\nCopyright \u0026copy; 2025 Taichi Ishitani.\nRbToon is licensed under the terms of the [MIT License](https://opensource.org/licenses/MIT), see [LICENSE.txt](LICENSE.txt) for further details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaichi-ishitani%2Frbtoon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaichi-ishitani%2Frbtoon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaichi-ishitani%2Frbtoon/lists"}