{"id":13694296,"url":"https://github.com/akshaybharambe14/go-jsonc","last_synced_at":"2026-01-16T17:18:55.668Z","repository":{"id":57512030,"uuid":"238736366","full_name":"akshaybharambe14/go-jsonc","owner":"akshaybharambe14","description":"go-jsonc provides a way to work with commented json by converting it to plain json.","archived":false,"fork":false,"pushed_at":"2020-05-08T16:21:41.000Z","size":21,"stargazers_count":11,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-15T06:39:34.722Z","etag":null,"topics":["go","golang","gopkg","json","jsonc"],"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/akshaybharambe14.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-06T16:44:26.000Z","updated_at":"2024-11-20T09:00:46.000Z","dependencies_parsed_at":"2022-08-31T06:41:01.361Z","dependency_job_id":null,"html_url":"https://github.com/akshaybharambe14/go-jsonc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/akshaybharambe14/go-jsonc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshaybharambe14%2Fgo-jsonc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshaybharambe14%2Fgo-jsonc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshaybharambe14%2Fgo-jsonc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshaybharambe14%2Fgo-jsonc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akshaybharambe14","download_url":"https://codeload.github.com/akshaybharambe14/go-jsonc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshaybharambe14%2Fgo-jsonc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"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":["go","golang","gopkg","json","jsonc"],"created_at":"2024-08-02T17:01:28.850Z","updated_at":"2026-01-16T17:18:55.652Z","avatar_url":"https://github.com/akshaybharambe14.png","language":"Go","funding_links":[],"categories":["开源类库","Open source library"],"sub_categories":["JSON"],"readme":"# JSON with comments for GO\n\n- Decodes a \"commented json\" to \"json\". Provided, the input must be a valid jsonc document.\n- Supports io.Reader\n- With this, we can use commented json files as configuration for go applications.\n\nInspired by [muhammadmuzzammil1998](https://github.com/muhammadmuzzammil1998/jsonc)\n\n```jsonc\n{\n\t/*\n        some block comment\n  */\n\t\"string\": \"foo\", // a string\n\t\"bool\": false, // a boolean\n\t\"number\": 42, // a number\n\t// \"object\":{\n\t//     \"key\":\"val\"\n\t// },\n\t\"array\": [\n\t\t// example of an array\n\t\t1,\n\t\t2,\n\t\t3\n\t]\n}\n```\n\nGets converted to (spaces omitted)\n\n```json\n{ \"string\": \"foo\", \"bool\": false, \"number\": 42, \"array\": [1, 2, 3] }\n```\n\n## Motivation\n\n[jsonc](https://github.com/muhammadmuzzammil1998/jsonc) is great. But this package provides significant performance improvements and simple API to use it with standard library. See [benchmarks](https://link)\n\n## Usage\n\nGet this package\n\n```sh\n\ngo get github.com/akshaybharambe14/go-jsonc\n\n```\n\n## Benchmarks\n\nHere is the performance comparison as compared to [JSONC](https://github.com/muhammadmuzzammil1998/jsonc)\n\ngo-jsonc avoids allocations to heap to gain the performance.\n\n```text\ngoos: windows\ngoarch: amd64\npkg: github.com/akshaybharambe14/go-jsonc/benchmarks\nBenchmarkOwnSmallJSONBytes-4              256599              4952 ns/op         353.00 MB/s           0 B/op          0 allocs/op\nBenchmarkOwnSmallJSONBytesReader-4        206823              5832 ns/op         299.70 MB/s        6224 B/op          5 allocs/op\nBenchmarkJSONCSmallJSONBytes-4            171474              6925 ns/op         252.41 MB/s        1792 B/op          1 allocs/op\nBenchmarkOwnBigJSONBytes-4                 33517             35921 ns/op         462.26 MB/s           0 B/op          0 allocs/op\nBenchmarkOwnBigJSONBytesReader-4          105244             11292 ns/op        1470.45 MB/s        6224 B/op          5 allocs/op\nBenchmarkJSONCBigJSONBytes-4               19599             61422 ns/op         270.34 MB/s       18432 B/op          1 allocs/op\nPASS\nok      github.com/akshaybharambe14/go-jsonc/benchmarks 26.250s\n```\n\n## Example\n\nsee [examples](https://github.com/akshaybharambe14/go-jsonc/tree/master/examples)\n\n## License\n\n`go-jsonc` is open source and available under [MIT License](License.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshaybharambe14%2Fgo-jsonc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakshaybharambe14%2Fgo-jsonc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshaybharambe14%2Fgo-jsonc/lists"}