--- id: json-merge-patch version: "0.3.0" license: BSD license_treatment: permissive maintenance: aging --- # json-merge-patch — JSON Merge Patch library (https://tools.ietf.org/html/rfc7386) License: permissive · Maintenance: aging · Downloads: 5.2M/mo ## What it is and what it does json-merge-patch is a lightweight library that implements JSON Merge Patch as defined in RFC 7386. It provides two core operations: merge, which combines multiple dictionaries in sequence, and create_patch, which computes the minimal patch needed to transform one dictionary into another. The library works only with Python dictionaries and leaves JSON serialization/deserialization to the caller. It has no external dependencies and runs on Python 3.9 or later. The package also includes a command-line interface for merging JSON files and generating patches without writing code. It's useful for configuration management, API responses, and any workflow where you need to apply or compute incremental changes to JSON data. Use it for: - Merge configuration files or settings objects where later values override earlier ones. - Generate minimal patches for API responses or data synchronization protocols. - Build tools that need to apply incremental updates to JSON documents. - Command-line workflows to combine or diff JSON files without scripting. - Implement RFC 7386–compliant merge semantics in larger applications. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Merges JSON objects according to RFC 7386 and generates minimal patches to transform one JSON structure into another. Yes. The package is stable, dependency-free, and widely used (top 5000 on PyPI). It solves a specific, well-defined problem with no security vulnerabilities. The aging maintenance status is not a concern for a small, feature-complete library—install it if you need RFC 7386 merge semantics. ## Install pip install json-merge-patch uv add json-merge-patch poetry add json-merge-patch ## Installing json-merge-patch Before you install: Low friction—no runtime dependencies outside the standard library. Aging maintenance status (last release 507 days ago), but the repository remains active and the package is widely used. License in practice: BSD license is permissive; you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install json-merge-patch import json_merge_patch input1 = {"a": 1} input2 = {"a": 2, "b": 3} result = json_merge_patch.merge(input1, input2) print(result) # {'a': 2, 'b': 3} Requires Python 3.9 or later. Verify before relying: - Whether the 507-day gap since last release indicates maintenance is stalled or simply stable. - Performance characteristics when merging very large JSON structures. ## Package facts - License: BSD (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 5.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags json merge patch rfc 7386, merge json objects, json patch generation, json diff and patch, apply json patches, json merge library, json, rfc-7386, cli-tool [View on SkillFed](https://skillfed.io/packages/json-merge-patch) · [View on PyPI](https://pypi.org/project/json-merge-patch/)