{"id":31456719,"url":"https://github.com/eclipsesource/json-reconcile","last_synced_at":"2025-10-01T11:27:45.356Z","repository":{"id":273871785,"uuid":"921141816","full_name":"eclipsesource/json-reconcile","owner":"eclipsesource","description":"Typescript library for diffing and merging JSON models","archived":false,"fork":false,"pushed_at":"2025-03-14T14:31:26.000Z","size":285,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-14T15:40:44.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/eclipsesource.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":"2025-01-23T12:19:06.000Z","updated_at":"2025-03-14T14:31:30.000Z","dependencies_parsed_at":"2025-01-23T13:33:38.746Z","dependency_job_id":"45beec73-9c23-4692-a284-7c47a31cdac8","html_url":"https://github.com/eclipsesource/json-reconcile","commit_stats":null,"previous_names":["eclipsesource/json-reconcile"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eclipsesource/json-reconcile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipsesource%2Fjson-reconcile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipsesource%2Fjson-reconcile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipsesource%2Fjson-reconcile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipsesource%2Fjson-reconcile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipsesource","download_url":"https://codeload.github.com/eclipsesource/json-reconcile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipsesource%2Fjson-reconcile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277832750,"owners_count":25885051,"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","status":"online","status_checked_at":"2025-10-01T02:00:09.286Z","response_time":88,"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":[],"created_at":"2025-10-01T11:27:40.373Z","updated_at":"2025-10-01T11:27:45.339Z","avatar_url":"https://github.com/eclipsesource.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# json-reconcile [![Project - Active Development](https://img.shields.io/badge/Project-Active-2ea44f)](https://github.com/eclipsesource/.github/blob/main/repository-classification.md) [![Aim - PoC](https://img.shields.io/badge/Aim-PoC-a45b2e)](https://github.com/eclipsesource/.github/blob/main/repository-classification.md)\n\nTypescript library for diffing and merging JSON models\n\n## Purpose\n\n- easy-to-use conflict management\n- comparison and merging functionality in a general way\n- platform-independent REST API that can handle model conflicts in JSON format\n- 2-way and 3-way merge supported\n- state of the merging progress is saved and handled with session cookies\n\n## Examples\n\n### update update conflict\n\n#### Request\n\n```json\nPOST /dicome/compare\nContent-Type: application/json\n\n{\n  \"original\": {\n    \"package\": {\n      \"id\": \"scml\",\n      \"classes\": [\n        {\n          \"id\": \"xyz\",\n          \"name\": \"Smart City\"\n        }\n      ]\n    }\n  },\n  \"left\": {\n    \"package\": {\n      \"id\": \"scml\",\n      \"classes\": [\n        {\n          \"id\": \"xyz\",\n          \"name\": \"SmartCity\"\n        }\n      ]\n    }\n  },\n  \"right\": {\n    \"package\": {\n      \"id\": \"scml\",\n      \"classes\": [\n        {\n          \"id\": \"xyz\",\n          \"name\": \"Smart_City\"\n        }\n      ]\n    }\n  }\n}\n```\n\n## Usage\n\n### API Description\n\n```bash\nPOST /dicome/compare\n```\n\ninitial endpoint, if request header not set then new session is created (set cookie header for all following requests)\n\n**Request Header:** optional current session - session cookie\n\n**Request Body:** model left, model right (and original)\n\n**Response:** diffmodel\n\n```bash\nGET /dicome/model/left\n```\n\n**Request Header:** current session - session cookie\n\n**Request Body:** -\n\n**Response:** left model\n\n```bash\nGET /dicome/model/right\n```\n\n**Request Header:** current session - session cookie\n\n**Request Body:** -\n\n**Response:** right model\n\n```bash\nGET /dicome/model/diff\n```\n\n**Request Header:** current session - session cookie\n\n**Request Body:** -\n\n**Response:** diff model\n\n```bash\nPUT /dicome/apply/[ltr | rtl]\n```\n\n**Request Header:** current session - session cookie\n\n**Parameter:** ltr (left to right) or rtl (right to left)\n\n**Request Body:** list of 1-n changes to apply\n\n**Response:** JSON patch (if technically possible) of diff model and left/right\n\n```bash\nPUT /dicome/accept\n```\n\nfor conflicts, if this is a left change then right automatically rejected and vis a versa\n\n**Request Header:** current session - session cookie\n\n**Request Body:** list of 1-n changes to apply\n\n**Response:** JSON patch (if technically possible) of diff model and left/right\n\n```bash\nPUT /dicome/reject\n```\n\nfor conflicts, if this is a left change then right automatically acctepted and vis a versa\n\n**Request Header:** current session - session cookie\n\n**Request Body:** list of 1-n changes to reject\n\n**Response:** JSON patch (if technically possible) of diff model and left/right\n\n```bash\nDELETE /dicome/session\n```\n\ntriggers cleanup (remove models)\n\n**Request Header:** current session - session cookie\n\n**Request Body:** -\n\n**Response:** 200 OK\n\n## Build \u0026 Run\n\n``` npx tsc ``` or ``` npm run build ```\n\nand then\n\n``` node dist/src/api/testRunner.js ```\n\n## Run Tests with ECMAScript Modules\n\nfrom package.json command:\n``` npm run test ```\n\nfrom console:\n``` NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipsesource%2Fjson-reconcile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipsesource%2Fjson-reconcile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipsesource%2Fjson-reconcile/lists"}