{"id":19976282,"url":"https://github.com/vyskocilm/jf","last_synced_at":"2026-06-20T12:32:02.919Z","repository":{"id":57540453,"uuid":"288761420","full_name":"vyskocilm/jf","owner":"vyskocilm","description":"Json difF: Go library and CLI printing diffs of two json files","archived":false,"fork":false,"pushed_at":"2020-09-17T12:56:57.000Z","size":90,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-11T23:28:37.891Z","etag":null,"topics":["bsd-3-clause","cmdline","go","golang","json","json-diff"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vyskocilm.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":"2020-08-19T14:58:00.000Z","updated_at":"2022-10-21T12:09:26.000Z","dependencies_parsed_at":"2022-09-26T22:20:15.720Z","dependency_job_id":null,"html_url":"https://github.com/vyskocilm/jf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vyskocilm/jf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyskocilm%2Fjf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyskocilm%2Fjf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyskocilm%2Fjf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyskocilm%2Fjf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vyskocilm","download_url":"https://codeload.github.com/vyskocilm/jf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyskocilm%2Fjf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34570533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bsd-3-clause","cmdline","go","golang","json","json-diff"],"created_at":"2024-11-13T03:22:59.722Z","updated_at":"2026-06-20T12:32:02.905Z","avatar_url":"https://github.com/vyskocilm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/vyskocilm/jf.svg?style=svg)](https://circleci.com/gh/vyskocilm/jf) [![license](https://img.shields.io/badge/license-bsd--3--clause-green)](https://raw.githubusercontent.com/vyskocilm/jf/master/LICENSE)\n\n# jf: Json difF\n\nJSON diff library and simple CLI in Go. It can diff two arbitrary complex JSON\nfiles if they starts as an json object.\n\n\n## Installation and usage\n\n```sh\ngit clone https://github.com/vyskocilm/jf\ncd jf\ngo test\ngo build github.com/vyskocilm/jf/cmd/jf\n./jf testdata/a.json testdata/b.json\nbool       true    false\nints[2]    1       99\nnumber     42      43\nstring     \"hello\" \"hellp\"\nstrings[1] \"world\" \"worle\"\n```\n\n**Warning**: depends on `reflect` and `gihub.com/stretchr/objx` and both CAN\npanic in some circumstances.  Package `jf` type checks everything before use,\nso it uses methods like `value.MustInt()`. However it panics itself if code ends\nin an impossible (or not yet implemented one) situation. For example if\ndiffing code finds a weird type of `interface{}`, like Go channel or a pointer.\nThose can't be passed in JSON.\n\nIn any case. Panic of `jf` is always a sign of a bug or missing feature, so do\nnot forget to create [an issue on GitHub](https://github.com/vyskocilm/jf/issues)\nif you will find one.\n\n## Features\n\n1. compare primitive values, ints, floats, bools and strings\n2. allows a specification of float equality function (can be used for int/float coercion)\n3. compare arrays and maps\n4. null coerce for A/B or both jsons\n5. ignore certain keys\n6. basic cmdline tool\n7. ignore order of arrays\n\n## TODO\n\n0. API docs\n1. flags for cmdline tool (those starting by `x-` are temporary only and will be dropped)\n2. custom comparator on objx.Value/objx.Value or string???\n\n## Simple values\n```\n{\n \"number\": 42,\n \"string\": \"hello\",\n \"strings\": [\"hello\", \"world\"],\n \"ints\": [4, 2, 1]\n}\n------------------------------\n{\n \"number\": 43,\n \"string\": \"hellp\",\n \"strings\": [\"hello\", \"worle\"],\n \"ints\": [4, 2, 99]\n}\n------------------------------\nints[2]    1       99\nnumber     42      43\nstring     \"hello\" \"hellp\"\nstrings[1] \"world\" \"worle\"\n```\n\n## Nested maps\n\n```\n{\n \"key\": {\n  \"subkey\": {\n   \"id\": 11,\n   \"name\": \"joe\"\n  }\n }\n}\n------------------------------\n{\n \"key\": {\n  \"subkey\": {\n   \"id\": 11,\n   \"name\": \"Joe\"\n  }\n }\n}\n------------------------------\nkey.subkey.name \"joe\" \"Joe\"\n```\n\nSee [jsondiff_test.go](jsondiff_test.go) for more examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvyskocilm%2Fjf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvyskocilm%2Fjf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvyskocilm%2Fjf/lists"}