{"id":15857730,"url":"https://github.com/jar-b/jsondup","last_synced_at":"2025-04-01T19:43:39.050Z","repository":{"id":194551214,"uuid":"690705371","full_name":"jar-b/jsondup","owner":"jar-b","description":"Detect duplicate keys in a JSON object.","archived":false,"fork":false,"pushed_at":"2023-09-20T18:08:10.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T12:47:44.159Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jar-b.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":"2023-09-12T17:52:14.000Z","updated_at":"2023-09-13T20:31:45.000Z","dependencies_parsed_at":"2023-09-14T03:26:34.233Z","dependency_job_id":"6ee82a3c-72e2-46c8-9b8e-48f6ea3d0b34","html_url":"https://github.com/jar-b/jsondup","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.0714285714285714,"last_synced_commit":"bc51298c34c44a43c5d3dfb51bb10f75cc37ffcb"},"previous_names":["jar-b/jsondup"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jar-b%2Fjsondup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jar-b%2Fjsondup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jar-b%2Fjsondup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jar-b%2Fjsondup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jar-b","download_url":"https://codeload.github.com/jar-b/jsondup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246703872,"owners_count":20820492,"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":[],"created_at":"2024-10-05T20:41:24.115Z","updated_at":"2025-04-01T19:43:39.010Z","avatar_url":"https://github.com/jar-b.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsondup\n[![build](https://github.com/jar-b/jsondup/actions/workflows/build.yml/badge.svg)](https://github.com/jar-b/jsondup/actions/workflows/build.yml)\n\nDetect duplicate keys in a JSON object.\n\n\n## Installation\n\n```console\ngo install github.com/jar-b/jsondup/cmd/jsondup@latest\n```\n\n## Usage\n\n```console\n$ jsondup -h\nDetect duplicate keys in a JSON object.\n\nUsage: jsondup [filename]\n```\n\n## Examples\n\n### Simple\n\nGiven the following content in `dup.json`:\n\n```json\n{\n  \"a\": \"foo\",\n  \"a\": \"bar\"\n}\n```\n\n```console\n$ jsondup dup.json\n2023/09/12 15:53:29 duplicate key \"a\"\n```\n\n### Nested\n\nA more complex example might be an AWS IAM policy document with duplicated `Condition` keys:\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": \"s3:PutObject\",\n      \"Resource\": \"*\",\n      \"Condition\": {\n        \"StringEquals\": {\n          \"s3:prefix\": [\"one/\", \"two/\"]\n        },\n        \"StringEquals\": {\n          \"s3:versionid\": \"abc123\"\n        }\n      }\n    }\n  ]\n}\n```\n\n```console\n$ jsondup iam.json\n2023/09/12 15:57:15 duplicate key \"Statement.0.Condition.StringEquals\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjar-b%2Fjsondup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjar-b%2Fjsondup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjar-b%2Fjsondup/lists"}