{"id":17335764,"url":"https://github.com/thsutton/aeson-diff","last_synced_at":"2025-04-14T17:30:40.218Z","repository":{"id":23371152,"uuid":"26732478","full_name":"thsutton/aeson-diff","owner":"thsutton","description":"Generate and apply diffs between JSON documents.","archived":false,"fork":false,"pushed_at":"2022-10-05T08:49:30.000Z","size":124,"stargazers_count":37,"open_issues_count":10,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-08-01T05:13:04.828Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thsutton.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-11-16T23:50:51.000Z","updated_at":"2023-08-01T05:13:04.829Z","dependencies_parsed_at":"2023-01-13T23:12:14.831Z","dependency_job_id":null,"html_url":"https://github.com/thsutton/aeson-diff","commit_stats":null,"previous_names":[],"tags_count":5,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thsutton%2Faeson-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thsutton%2Faeson-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thsutton%2Faeson-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thsutton%2Faeson-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thsutton","download_url":"https://codeload.github.com/thsutton/aeson-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219843484,"owners_count":16556504,"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-15T15:12:05.253Z","updated_at":"2024-10-15T15:12:05.891Z","avatar_url":"https://github.com/thsutton.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Aeson Diff\n==========\n\n[![Build Status][badge]][status]\n[![Hackage](https://img.shields.io/hackage/v/aeson-diff.svg?maxAge=2592000)](https://hackage.haskell.org/package/aeson-diff)\n[![Hackage-Deps](https://img.shields.io/hackage-deps/v/aeson-diff.svg?maxAge=2592000)]()\n\nThis is a small library for working with changes to JSON documents. It\nincludes a library and two executables in the style of diff(1) and\npatch(1). Patches are themselves JSON Patch documents as specified in\n[RFC 6902][3].\n\nInstalling\n----------\n\nThe `aeson-diff` package is written in Haskell and can be installed using the\n[Cabal][1] package management tool, [stack][2], or something similar.\n\n````bash\nstack install aeson-diff\n````\n\nThe command-line tools can then be executed using stack:\n\n````\nstack exec json-diff -- ....\nstack exec json-patch -- ....\n````\n\nIf you prefer to use Cabal, something like this might do the trick:\n\n````bash\ncd aeson-diff/\ncabal sandbox init\ncabal install --dependencies-only\ncabal build\nsudo mkdir -p /usr/local/bin\nsudo cp dist/build/json-*/json-{diff,patch} /usr/local/bin/\n````\n\nUsage\n-----\n\n### Patch format\n\n`aeson-diff` supports the JSON Patch format described in\n[RFC 6902][3].\n\n### json-diff command\n\nThe `json-diff` command compares two JSON documents and extracts a patch\ndescribing the differences between the first document and the second.\n\n````\nUsage: json-diff [-T|--test-before-remove] [-o|--output OUTPUT] FROM TO\nGenerate a patch between two JSON documents.\n\nAvailable options:\n    -h,--help                Show this help text\n    -T,--test-before-remove  Include a test before each remove.\n    -o,--output OUTPUT       Write patch to file OUTPUT.\n````\n\n### json-patch command\n\nThe `json-patch` command applies a patch describing changes to be made to\na JSON document.\n\n````\nUsage: json-patch [-o|--output OUTPUT] PATCH FROM\nGenerate a patch between two JSON documents.\n\nAvailable options:\n  -h,--help                Show this help text\n  -o,--output OUTPUT       Destination for patched JSON.\n  PATCH                    Patch to apply.\n  FROM                     JSON file to patch.\n````\n\n### aeson-diff library\n\nThe `aeson-diff` library exports as single module: `Data.Aeson.Diff`. This\nexports `diff` and `patch` functions which do exactly what might be expected:\n\n- `diff :: Value -\u003e Value -\u003e Patch` examines source and target JSON `Value`s\nand constructs a new `Patch` describing the changes.\n\n- `patch :: Patch -\u003e Value -\u003e Result Value` applies the changes in a `Patch` to a JSON\n`Value`. If an error results then an exception is thrown.\n\nFor more complete information, see the [documentation][docs].\n\n[badge]: https://travis-ci.org/thsutton/aeson-diff.svg?branch=master\n[status]: https://travis-ci.org/thsutton/aeson-diff\n[docs]: https://hackage.haskell.org/package/aeson-diff/docs/Data-Aeson-Diff.html\n[1]: https://wiki.haskell.org/Cabal-Install\n[2]: http://haskellstack.org/\n[3]: http://tools.ietf.org/html/rfc6902\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthsutton%2Faeson-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthsutton%2Faeson-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthsutton%2Faeson-diff/lists"}