{"id":17068140,"url":"https://github.com/andreyvit/jsonfix","last_synced_at":"2026-02-11T08:42:33.372Z","repository":{"id":151007799,"uuid":"623353326","full_name":"andreyvit/jsonfix","owner":"andreyvit","description":"Allows trailing commas, comments and bare keys in JSON in Go","archived":false,"fork":false,"pushed_at":"2025-01-28T14:28:30.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T05:32:04.043Z","etag":null,"topics":["golang","json"],"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/andreyvit.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":"2023-04-04T07:49:18.000Z","updated_at":"2025-01-28T14:28:34.000Z","dependencies_parsed_at":"2025-10-11T05:31:32.784Z","dependency_job_id":"d013902d-6b69-46ab-aaae-7ff5634d1f78","html_url":"https://github.com/andreyvit/jsonfix","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/andreyvit/jsonfix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreyvit%2Fjsonfix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreyvit%2Fjsonfix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreyvit%2Fjsonfix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreyvit%2Fjsonfix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreyvit","download_url":"https://codeload.github.com/andreyvit/jsonfix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreyvit%2Fjsonfix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29330200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"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"],"created_at":"2024-10-14T11:12:32.969Z","updated_at":"2026-02-11T08:42:33.339Z","avatar_url":"https://github.com/andreyvit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Allow trailing commas, comments and bare keys in JSON in Go\n===========================================================\n\n[![Go reference](https://pkg.go.dev/badge/github.com/andreyvit/jsonfix.svg)](https://pkg.go.dev/github.com/andreyvit/jsonfix) ![Zero dependencies](https://img.shields.io/badge/deps-zero-brightgreen) ![150 LOC](https://img.shields.io/badge/size-%3C100%20LOC-green) ![100% coverage](https://img.shields.io/badge/coverage-100%25-green) [![Go Report Card](https://goreportcard.com/badge/github.com/andreyvit/jsonfix)](https://goreportcard.com/report/github.com/andreyvit/jsonfix)\n\n```json5\n// Comments are allowed\n{\n    \"FOO\": [1, 2, 3,], // trailing comma in an array\n    BAR: 42,           // unquoted property name\n    \"BOZ\": 24,         // trailing comma in an object\n}\n/* block comments\n   are supported as well */\n````\n\n\nWhy?\n----\n\nFixes annoying problems with manually-written JSON in Go:\n\n* lack of trailing commas,\n* lack of comments.\n\nWe also support bare property names. You can use those for convenience, but the primary motivation is that if you feed JSON through one of those newfangled modern JS formatters, they will often unquote the keys, which is very annoying in some cases.\n\nWhy this library: it's a tiny JSON preprocessor, allowing to use standard `encoding/json`. No code duplication, no missing features (e.g. `DisallowUnknownFields`), no surprises, smooth upgrade path to JSON v2 (won't even require any changes here).\n\n\nUsage\n-----\n\nInstall:\n\n    go get github.com/andreyvit/jsonfix\n\nUse:\n\n```go\njson.Unmarshal(jsonfix.Bytes(source), whatever)\n```\n\nWe preserve line numbers when preprocessing.\n\n\nContributing\n------------\n\nWe accept contributions that:\n\n* add better documentation and examples;\n* add more tests;\n* improve handling of invalid JSON (we don't know any problems so far, but it hasn't been a huge focus so far);\n* implement single-quoted strings (one could make a case similar to bare keys here, if widespread formatters start preferring single quotes);\n* fix bugs.\n\nOut of scope (unless you convince us otherwise):\n\n* multiline strings\n* unquoted string values\n* the rest of JSON5\n\nWe recommend [modd](https://github.com/cortesi/modd) (`go install github.com/cortesi/modd/cmd/modd@latest`) for continuous testing during development.\n\nMaintain 100% coverage. It's not often the right choice, but it is for this library.\n\n\nChangelog\n---------\n\n* 1.1.0 (2025-01-27): Added bare keys and block comments.\n\n* 1.0.0 (2023-04-04): Initial release supporting trailing commas and line comments.\n\n\nMIT license\n-----------\n\nCopyright (c) 2023–2025 Andrey Tarantsov. Published under the terms of the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreyvit%2Fjsonfix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreyvit%2Fjsonfix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreyvit%2Fjsonfix/lists"}