{"id":20550161,"url":"https://github.com/dnmfarrell/strip-json-comments","last_synced_at":"2026-04-10T12:05:23.965Z","repository":{"id":149704080,"uuid":"469386611","full_name":"dnmfarrell/Strip-JSON-Comments","owner":"dnmfarrell","description":"Removes JSON comments from jsonc text","archived":false,"fork":false,"pushed_at":"2022-03-14T14:08:53.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-06T05:43:34.565Z","etag":null,"topics":["golang","json","jsonc","linux","perl"],"latest_commit_sha":null,"homepage":"","language":"Go","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/dnmfarrell.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}},"created_at":"2022-03-13T13:55:20.000Z","updated_at":"2022-03-14T00:48:07.000Z","dependencies_parsed_at":"2024-06-21T17:55:23.708Z","dependency_job_id":"c47d2c39-4ffb-4cde-b11a-7d0024567849","html_url":"https://github.com/dnmfarrell/Strip-JSON-Comments","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dnmfarrell/Strip-JSON-Comments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FStrip-JSON-Comments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FStrip-JSON-Comments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FStrip-JSON-Comments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FStrip-JSON-Comments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnmfarrell","download_url":"https://codeload.github.com/dnmfarrell/Strip-JSON-Comments/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FStrip-JSON-Comments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31641493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","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":["golang","json","jsonc","linux","perl"],"created_at":"2024-11-16T02:23:37.291Z","updated_at":"2026-04-10T12:05:23.921Z","avatar_url":"https://github.com/dnmfarrell.png","language":"Go","readme":"Strip JSON Comments\n-------------------\nStrips single line `//` and block `/* */` comments from .jsonc text:\n\n```\necho '[1, /* strip this comment */ 2, 3]' | ./strip-jsonc \n[1,                          2, 3]\n```\n\n### Comment characters are replaced with spaces\nTo preserve line and column locations of the remaining JSON text.\n\n### Block comments do not nest\nJSONC doesn't have a spec but its block comments have been [described](https://code.visualstudio.com/docs/languages/json#_json-with-comments) as behaving like JavaScript, i.e. they do not nest.\n\n### Trailing commas are not removed\nSome JSONC parsers support trailing commas, but as `strip-jsonc` is line-oriented, it does not have an option to remove trailing commas.\n\n### Test input\nThis repo contains a test input file called `test.jsonc` which exercises the different cases of embedding comments in JSON.\n\n### Perl\nThe `strip-jsonc` script is written in Perl and designed to be fast and compatible with any version of Perl 5.\n\n### Go\nThere is a golang variant of the strip-jsonc script which has the same behavior as the Perl script but can be 3-4x faster for large inputs. It can be compiled with go build:\n\n```\ngo build gostrip-jsonc.go\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnmfarrell%2Fstrip-json-comments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnmfarrell%2Fstrip-json-comments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnmfarrell%2Fstrip-json-comments/lists"}