{"id":17891334,"url":"https://github.com/cside/jsondiff","last_synced_at":"2025-10-27T10:39:05.681Z","repository":{"id":57487983,"uuid":"119022348","full_name":"Cside/jsondiff","owner":"Cside","description":"Reports differences between two JSONs.","archived":false,"fork":false,"pushed_at":"2023-02-02T09:59:19.000Z","size":1019,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-21T05:29:51.679Z","etag":null,"topics":["diff","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/Cside.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}},"created_at":"2018-01-26T07:50:43.000Z","updated_at":"2023-02-02T09:56:20.000Z","dependencies_parsed_at":"2023-02-17T18:15:53.632Z","dependency_job_id":null,"html_url":"https://github.com/Cside/jsondiff","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cside%2Fjsondiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cside%2Fjsondiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cside%2Fjsondiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cside%2Fjsondiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cside","download_url":"https://codeload.github.com/Cside/jsondiff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221839128,"owners_count":16889590,"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":["diff","golang","json"],"created_at":"2024-10-28T14:16:38.690Z","updated_at":"2025-10-27T10:39:05.618Z","avatar_url":"https://github.com/Cside.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsondiff [![wercker status](https://app.wercker.com/status/cf6fb86dc49eadcac25f466f8df9d05b/s/master \"wercker status\")](https://app.wercker.com/project/byKey/cf6fb86dc49eadcac25f466f8df9d05b) [![GoDoc](https://godoc.org/github.com/Cside/jsondiff?status.svg)](http://godoc.org/github.com/Cside/jsondiff)\n\nReports differences between two JSONs\n\n## Example\n\n```go\nimport (\n\t\"testing\"\n\t\"github.com/Cside/jsondiff\"\n)\n\na := []byte(`{ \"foo\":1, \"bar\":2 }`)\nb := []byte(`{ \"foo\":1, \"bar\":3 }`)\n\nif diff := jsondiff.Diff(a, b); diff != \"\" {\n\tt.Errorf(\"two jsons are not equal. diff:\\n%s\", diff)\n}\n```\n\noutput:\n\n```\n=== RUN   TestMain\n--- FAIL: TestMain (0.00s)\n        main_test.go:14: two jsons are not equal. diff:\n                  {\n                -   \"bar\": 2,\n                +   \"bar\": 3,\n                    \"foo\": 1\n                  }\nFAIL\nexit status 1\n```\n\n## Ignore values\n\nYou can ignore some values with specifiying `diffopts.IgnorePath(paths []string)` option.\n\nTarget values can be specified with [JSON Pointer](https://tools.ietf.org/html/rfc6901) .\n\nThe following test passes.\n\n```go\nimport (\n\t\"testing\"\n\t\"github.com/Cside/jsondiff\"\n\t\"github.com/Cside/jsondiff/diffopts\"\n)\n\na := []byte(`{ \"foo\": 1, \"createdAt\": 1517141881 }`)\nb := []byte(`{ \"foo\": 1, \"createdAt\": 1528845681 }`)\n\nif diff := jsondiff.Diff(a, b, diffopts.IgnorePaths([]string{\"/createdAt\"})); diff != \"\" {\n\tt.Errorf(\"two jsons are not equal. diff:\\n%s\", diff)\n}\n```\n\n## License\n\n[The MIT License](/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcside%2Fjsondiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcside%2Fjsondiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcside%2Fjsondiff/lists"}