{"id":15684136,"url":"https://github.com/taichi-ishitani/rb_json5","last_synced_at":"2025-05-05T21:35:45.695Z","repository":{"id":55491473,"uuid":"282369112","full_name":"taichi-ishitani/rb_json5","owner":"taichi-ishitani","description":"JSON5 parser for Ruby","archived":false,"fork":false,"pushed_at":"2024-02-05T02:41:14.000Z","size":50,"stargazers_count":16,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T23:48:15.396Z","etag":null,"topics":["json5","json5-parser"],"latest_commit_sha":null,"homepage":"","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","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-25T04:19:19.000Z","updated_at":"2024-12-09T15:52:15.000Z","dependencies_parsed_at":"2023-02-01T18:31:40.378Z","dependency_job_id":null,"html_url":"https://github.com/taichi-ishitani/rb_json5","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-ishitani%2Frb_json5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-ishitani%2Frb_json5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-ishitani%2Frb_json5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-ishitani%2Frb_json5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taichi-ishitani","download_url":"https://codeload.github.com/taichi-ishitani/rb_json5/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252580665,"owners_count":21771375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["json5","json5-parser"],"created_at":"2024-10-03T17:11:34.770Z","updated_at":"2025-05-05T21:35:45.643Z","avatar_url":"https://github.com/taichi-ishitani.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/rb_json5.svg)](https://badge.fury.io/rb/rb_json5)\n![CI](https://github.com/taichi-ishitani/rb_json5/workflows/CI/badge.svg)\n[![Maintainability](https://api.codeclimate.com/v1/badges/5f19b310082c03475c83/maintainability)](https://codeclimate.com/github/taichi-ishitani/rb_json5/maintainability)\n[![codecov](https://codecov.io/gh/taichi-ishitani/rb_json5/branch/master/graph/badge.svg)](https://codecov.io/gh/taichi-ishitani/rb_json5)\n[![Inline docs](http://inch-ci.org/github/taichi-ishitani/rb_json5.svg?branch=master)](http://inch-ci.org/github/taichi-ishitani/rb_json5)\n\n# RbJSON5\n\n[JSON5](https://json5.org/) parser for Ruby\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rb_json5'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install rb_json5\n\n## Usage\n\nUse `RbJSON5.parse` method to parse JSON5 string.\nYou can convert property names into `Symbol` by setting `symbolize_names` optional argument to `true`.\n\n```ruby\nrequire 'rb_json5'\n\n# https://github.com/json5/json5#short-example\njson5 = \u003c\u003c~'JSON5'\n{\n   // comments\n   unquoted: 'and you can quote me on that',\n   singleQuotes: 'I can use \"double quotes\" here',\n   lineBreaks: \"Look, Mom! \\\n No \\\\n's!\",\n   hexadecimal: 0xdecaf,\n   leadingDecimalPoint: .8675309, andTrailing: 8675309.,\n   positiveSign: +1,\n   trailingComma: 'in objects', andIn: ['arrays',],\n   \"backwardsCompatible\": \"with JSON\",\n }\nJSON5\n\nRbJSON5.parse(json5)\n  # =\u003e\n  # {\n  #   \"unquoted\"=\u003e\"and you can quote me on that\",\n  #   \"singleQuotes\"=\u003e\"I can use \\\"double quotes\\\" here\",\n  #   \"lineBreaks\"=\u003e\"Look, Mom! No \\\\n's!\",\n  #   \"hexadecimal\"=\u003e912559,\n  #   \"leadingDecimalPoint\"=\u003e0.8675309,\n  #   \"andTrailing\"=\u003e8675309.0,\n  #   \"positiveSign\"=\u003e1,\n  #   \"trailingComma\"=\u003e\"in objects\",\n  #   \"andIn\"=\u003e[\"arrays\"],\n  #   \"backwardsCompatible\"=\u003e\"with JSON\"\n  # }\nRbJSON5.parse(json5, symbolize_names: true)\n  # =\u003e\n  # {\n  #   :unquoted=\u003e\"and you can quote me on that\",\n  #   :singleQuotes=\u003e\"I can use \\\"double quotes\\\" here\",\n  #   :lineBreaks=\u003e\"Look, Mom! No \\\\n's!\",\n  #   :hexadecimal=\u003e912559,\n  #   :leadingDecimalPoint=\u003e0.8675309,\n  #   :andTrailing=\u003e8675309.0,\n  #   :positiveSign=\u003e1,\n  #   :trailingComma=\u003e\"in objects\",\n  #   :andIn=\u003e[\"arrays\"],\n  #   :backwardsCompatible=\u003e\"with JSON\"\n  # }\n```\n\n## Contributing \u0026 Contact\n\nBug reports, feature requests, pull requests and questions are welcome! You can use following methods:\n\n* [Issue tracker](https://github.com/taichi-ishitani/rb_json5/issues)\n* [Pull request](https://github.com/taichi-ishitani/rb_json5/pulls)\n* [Mail](mailto:taichi730@gmail.com)\n\n## Note\n\nTest-suite and JSON5 code snippets for RSpec examples are originaly from:\n\n* https://github.com/json5/json5-tests\n* https://github.com/json5/json5/blob/master/test/parse.js\n* https://github.com/json5/json5/blob/master/test/errors.js\n* https://github.com/json5/json5#short-example\n\n## Copyright \u0026 License\n\nCopyright \u0026copy; 2020 Taichi Ishitani.\nRbJSON5 is licensed under [MIT License](https://opensource.org/licenses/MIT), see [LICENSE](LICENSE) for further details.\n\n## Code of Conduct\n\nEveryone interacting in the RbJson5 project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/rb_json5/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaichi-ishitani%2Frb_json5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaichi-ishitani%2Frb_json5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaichi-ishitani%2Frb_json5/lists"}