json-merge 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md ADDED
@@ -0,0 +1,966 @@
1
+ | 📍 NOTE |
2
+ | --- |
3
+ | RubyGems (the [GitHub org](https://github.com/rubygems/), not the website) [suffered](https://joel.drapper.me/p/ruby-central-security-measures/) a [hostile takeover](https://pup-e.com/blog/goodbye-rubygems/) in September 2025. |
4
+ | Ultimately [4 maintainers](https://www.reddit.com/r/ruby/s/gOk42POCaV) were [hard removed](https://bsky.app/profile/martinemde.com/post/3m3occezxxs2q) and a reason has been given for only 1 of those, while 2 others resigned in protest. |
5
+ | It is a [complicated story](https://joel.drapper.me/p/ruby-central-takeover/) which is difficult to [parse quickly](https://joel.drapper.me/p/ruby-central-fact-check/). |
6
+ | Simply put - there was active policy for adding or removing maintainers/owners of [rubygems](https://github.com/ruby/rubygems/blob/b1ab33a3d52310a84d16b193991af07f5a6a07c0/doc/rubygems/POLICIES.md?plain=1#L187-L196) and [bundler](https://github.com/ruby/rubygems/blob/b1ab33a3d52310a84d16b193991af07f5a6a07c0/doc/bundler/playbooks/TEAM_CHANGES.md), and those [policies were not followed](https://www.reddit.com/r/ruby/comments/1ove9vp/rubycentral_hates_this_one_fact/). |
7
+ | I'm adding notes like this to gems because I [don't condone theft](https://joel.drapper.me/p/ruby-central/) of repositories or gems from their rightful owners. |
8
+ | If a similar theft happened with my repos/gems, I'd hope some would stand up for me. |
9
+ | Disenfranchised former-maintainers have started [gem.coop](https://gem.coop). |
10
+ | Once available I will publish there exclusively; unless RubyCentral makes amends with the community. |
11
+ | The ["Technology for Humans: Joel Draper"](https://youtu.be/_H4qbtC5qzU?si=BvuBU90R2wAqD2E6) podcast episode by [reinteractive](https://reinteractive.com/ruby-on-rails) is the most cogent summary I'm aware of. |
12
+ | See [here](https://github.com/gem-coop/gem.coop/issues/12), [here](https://gem.coop) and [here](https://martinemde.com/2025/10/05/announcing-gem-coop.html) for more info on what comes next. |
13
+ | What I'm doing: A (WIP) proposal for [bundler/gem scopes](https://github.com/galtzo-floss/bundle-namespace), and a (WIP) proposal for a federated [gem server](https://github.com/galtzo-floss/gem-server). |
14
+
15
+ [rubygems-org]: https://github.com/rubygems/
16
+ [draper-security]: https://joel.drapper.me/p/ruby-central-security-measures/
17
+ [draper-takeover]: https://joel.drapper.me/p/ruby-central-takeover/
18
+ [ellen-takeover]: https://pup-e.com/blog/goodbye-rubygems/
19
+ [simi-removed]: https://www.reddit.com/r/ruby/s/gOk42POCaV
20
+ [martin-removed]: https://bsky.app/profile/martinemde.com/post/3m3occezxxs2q
21
+ [draper-lies]: https://joel.drapper.me/p/ruby-central-fact-check/
22
+ [draper-theft]: https://joel.drapper.me/p/ruby-central/
23
+ [reinteractive]: https://reinteractive.com/ruby-on-rails
24
+ [gem-coop]: https://gem.coop
25
+ [gem-naming]: https://github.com/gem-coop/gem.coop/issues/12
26
+ [martin-ann]: https://martinemde.com/2025/10/05/announcing-gem-coop.html
27
+ [gem-scopes]: https://github.com/galtzo-floss/bundle-namespace
28
+ [gem-server]: https://github.com/galtzo-floss/gem-server
29
+ [reinteractive-podcast]: https://youtu.be/_H4qbtC5qzU?si=BvuBU90R2wAqD2E6
30
+ [bundler-maint-policy]: https://github.com/ruby/rubygems/blob/b1ab33a3d52310a84d16b193991af07f5a6a07c0/doc/bundler/playbooks/TEAM_CHANGES.md
31
+ [rubygems-maint-policy]: https://github.com/ruby/rubygems/blob/b1ab33a3d52310a84d16b193991af07f5a6a07c0/doc/rubygems/POLICIES.md?plain=1#L187-L196
32
+ [policy-fail]: https://www.reddit.com/r/ruby/comments/1ove9vp/rubycentral_hates_this_one_fact/
33
+
34
+ [![Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0](https://logos.galtzo.com/assets/images/galtzo-floss/avatar-192px.svg)](https://discord.gg/3qme4XHNKN) [![ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5](https://logos.galtzo.com/assets/images/ruby-lang/avatar-192px.svg)](https://www.ruby-lang.org/) [![kettle-rb Logo by Aboling0, CC BY-SA 4.0](https://logos.galtzo.com/assets/images/kettle-rb/avatar-192px.svg)](https://github.com/kettle-rb)
35
+
36
+ [🖼️galtzo-i]: https://logos.galtzo.com/assets/images/galtzo-floss/avatar-192px.svg
37
+ [🖼️galtzo-discord]: https://discord.gg/3qme4XHNKN
38
+ [🖼️ruby-lang-i]: https://logos.galtzo.com/assets/images/ruby-lang/avatar-192px.svg
39
+ [🖼️ruby-lang]: https://www.ruby-lang.org/
40
+ [🖼️kettle-rb-i]: https://logos.galtzo.com/assets/images/kettle-rb/avatar-192px.svg
41
+ [🖼️kettle-rb]: https://github.com/kettle-rb
42
+
43
+ # ☯️ Json::Merge
44
+
45
+ [![Version](https://img.shields.io/gem/v/json-merge.svg)](https://bestgems.org/gems/json-merge) [![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/kettle-rb/json-merge.svg)](http://github.com/kettle-rb/json-merge/releases) [![License: MIT](https://img.shields.io/badge/License-MIT-259D6C.svg)](https://opensource.org/licenses/MIT) [![Downloads Rank](https://img.shields.io/gem/rd/json-merge.svg)](https://bestgems.org/gems/json-merge) [![Open Source Helpers](https://www.codetriage.com/kettle-rb/json-merge/badges/users.svg)](https://www.codetriage.com/kettle-rb/json-merge) [![CodeCov Test Coverage](https://codecov.io/gh/kettle-rb/json-merge/graph/badge.svg)](https://codecov.io/gh/kettle-rb/json-merge) [![Coveralls Test Coverage](https://coveralls.io/repos/github/kettle-rb/json-merge/badge.svg?branch=main)](https://coveralls.io/github/kettle-rb/json-merge?branch=main) [![QLTY Test Coverage](https://qlty.sh/gh/kettle-rb/projects/json-merge/coverage.svg)](https://qlty.sh/gh/kettle-rb/projects/json-merge/metrics/code?sort=coverageRating) [![QLTY Maintainability](https://qlty.sh/gh/kettle-rb/projects/json-merge/maintainability.svg)](https://qlty.sh/gh/kettle-rb/projects/json-merge) [![CI Heads](https://github.com/kettle-rb/json-merge/actions/workflows/heads.yml/badge.svg)](https://github.com/kettle-rb/json-merge/actions/workflows/heads.yml) [![CI Runtime Dependencies @ HEAD](https://github.com/kettle-rb/json-merge/actions/workflows/dep-heads.yml/badge.svg)](https://github.com/kettle-rb/json-merge/actions/workflows/dep-heads.yml) [![CI Current](https://github.com/kettle-rb/json-merge/actions/workflows/current.yml/badge.svg)](https://github.com/kettle-rb/json-merge/actions/workflows/current.yml) [![CI Truffle Ruby](https://github.com/kettle-rb/json-merge/actions/workflows/truffle.yml/badge.svg)](https://github.com/kettle-rb/json-merge/actions/workflows/truffle.yml) [![Deps Locked](https://github.com/kettle-rb/json-merge/actions/workflows/locked_deps.yml/badge.svg)](https://github.com/kettle-rb/json-merge/actions/workflows/locked_deps.yml) [![Deps Unlocked](https://github.com/kettle-rb/json-merge/actions/workflows/unlocked_deps.yml/badge.svg)](https://github.com/kettle-rb/json-merge/actions/workflows/unlocked_deps.yml) [![CI Supported](https://github.com/kettle-rb/json-merge/actions/workflows/supported.yml/badge.svg)](https://github.com/kettle-rb/json-merge/actions/workflows/supported.yml) [![CI Test Coverage](https://github.com/kettle-rb/json-merge/actions/workflows/coverage.yml/badge.svg)](https://github.com/kettle-rb/json-merge/actions/workflows/coverage.yml) [![CI Style](https://github.com/kettle-rb/json-merge/actions/workflows/style.yml/badge.svg)](https://github.com/kettle-rb/json-merge/actions/workflows/style.yml) [![CodeQL](https://github.com/kettle-rb/json-merge/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/kettle-rb/json-merge/security/code-scanning) [![Apache SkyWalking Eyes License Compatibility Check](https://github.com/kettle-rb/json-merge/actions/workflows/license-eye.yml/badge.svg)](https://github.com/kettle-rb/json-merge/actions/workflows/license-eye.yml)
46
+
47
+ `if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know](https://discord.gg/3qme4XHNKN), as I may have missed the [discord notification](https://discord.gg/3qme4XHNKN).
48
+
49
+ -----
50
+ `if ci_badges.map(&:color).all? { it == "green"}` 👇️ send money so I can do more of this. FLOSS maintenance is now my full-time job.
51
+
52
+ [![OpenCollective Backers](https://opencollective.com/kettle-rb/backers/badge.svg?style=flat)](https://opencollective.com/kettle-rb#backer) [![OpenCollective Sponsors](https://opencollective.com/kettle-rb/sponsors/badge.svg?style=flat)](https://opencollective.com/kettle-rb#sponsor) [![Sponsor Me on Github](https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github)](https://github.com/sponsors/pboling) [![Liberapay Goal Progress](https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat)](https://liberapay.com/pboling/donate) [![Donate on PayPal](https://img.shields.io/badge/donate-paypal-a51611.svg?style=flat&logo=paypal)](https://www.paypal.com/paypalme/peterboling) [![Buy me a coffee](https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat)](https://www.buymeacoffee.com/pboling) [![Donate on Polar](https://img.shields.io/badge/polar-donate-a51611.svg?style=flat)](https://polar.sh/pboling) [![Donate at ko-fi.com](https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg?style=flat)](https://ko-fi.com/O5O86SNP4)
53
+
54
+ ## 🌻 Synopsis
55
+
56
+ Json::Merge is a standalone Ruby module that intelligently merges two versions of a JSON file using tree-sitter AST analysis. It's like a smart "git merge" specifically designed for JSON configuration files. Built on top of [ast-merge](https://github.com/kettle-rb/ast-merge), it shares the same architecture as [prism-merge](https://github.com/kettle-rb/prism-merge) for Ruby source files.
57
+
58
+ For JSONC (JSON with Comments) support, see the [jsonc-merge](https://github.com/kettle-rb/jsonc-merge) gem.
59
+
60
+ ### Key Features
61
+
62
+ - **Tree-Sitter Powered**: Uses tree-sitter-json for accurate AST parsing
63
+ - **Intelligent**: Matches objects and arrays by structural signatures
64
+ - **Fuzzy Property Matching**: `ObjectMatchRefiner` matches similar property names
65
+ (e.g., `databaseUrl` ↔ `database_url`) using Levenshtein distance for naming convention differences
66
+ - **Full Provenance**: Tracks origin of every node
67
+ - **Standalone**: Minimal dependencies - just `ast-merge` and `ruby_tree_sitter`
68
+ - **Customizable**:
69
+ - `signature_generator` - callable custom signature generators
70
+ - `preference` - setting of `:template`, `:destination`, or a Hash for per-node-type preferences
71
+ - `node_splitter` - Hash mapping node types to callables for per-node-type merge customization (see [ast-merge](https://github.com/kettle-rb/ast-merge) docs)
72
+ - `add_template_only_nodes` - setting to retain nodes that do not exist in destination
73
+ - `match_refiners` - array of refiners for fuzzy matching (e.g., `ObjectMatchRefiner`)
74
+ ### Supported Node Types
75
+
76
+ | Node Type | Signature Format | Matching Behavior |
77
+ | --- | --- | --- |
78
+ | Object | `[:object, key_signatures...]` | Objects match by their key structure |
79
+ | Array | `[:array, element_count]` | Arrays match by position and type |
80
+ | Pair | `[:pair, key_name]` | Key-value pairs match by key name |
81
+ | String | `[:string, value]` | Strings match by value |
82
+ | Number | `[:number, value]` | Numbers match by value |
83
+ | Boolean | `[:boolean, value]` | Booleans match by value |
84
+ | Null | `[:null]` | Null values always match |
85
+
86
+ ### Example
87
+
88
+ ``` ruby
89
+ require "json/merge"
90
+
91
+ template = File.read("template.json")
92
+ destination = File.read("destination.json")
93
+
94
+ merger = Json::Merge::SmartMerger.new(template, destination)
95
+ result = merger.merge
96
+
97
+ File.write("merged.json", result.to_json)
98
+ ```
99
+
100
+ ### The `*-merge` Gem Family
101
+
102
+ This gem is part of a family of gems that provide intelligent merging for various file formats:
103
+
104
+ | Gem | Language<br>/ Format | Parser Backend(s) | Description |
105
+ |------------------------------------------|----------------------|-----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|
106
+ | [tree_haver][tree_haver] | Multi | MRI C, Rust, FFI, Java, Prism, Psych, Commonmarker, Markly, Citrus | **Foundation**: Cross-Ruby adapter for parsing libraries (like Faraday for HTTP) |
107
+ | [ast-merge][ast-merge] | Text | internal | **Infrastructure**: Shared base classes and merge logic for all `*-merge` gems |
108
+ | [bash-merge][bash-merge] | Bash | [tree-sitter-bash][ts-bash] (via tree_haver) | Smart merge for Bash scripts |
109
+ | [commonmarker-merge][commonmarker-merge] | Markdown | [Commonmarker][commonmarker] (via tree_haver) | Smart merge for Markdown (CommonMark via comrak Rust) |
110
+ | [dotenv-merge][dotenv-merge] | Dotenv | internal | Smart merge for `.env` files |
111
+ | [json-merge][json-merge] | JSON | [tree-sitter-json][ts-json] (via tree_haver) | Smart merge for JSON files |
112
+ | [jsonc-merge][jsonc-merge] | JSONC | [tree-sitter-jsonc][ts-jsonc] (via tree_haver) | ⚠️ Proof of concept; Smart merge for JSON with Comments |
113
+ | [markdown-merge][markdown-merge] | Markdown | [Commonmarker][commonmarker] / [Markly][markly] (via tree_haver) | **Foundation**: Shared base for Markdown mergers with inner code block merging |
114
+ | [markly-merge][markly-merge] | Markdown | [Markly][markly] (via tree_haver) | Smart merge for Markdown (CommonMark via cmark-gfm C) |
115
+ | [prism-merge][prism-merge] | Ruby | [Prism][prism] (`prism` std lib gem) | Smart merge for Ruby source files |
116
+ | [psych-merge][psych-merge] | YAML | [Psych][psych] (`psych` std lib gem) | Smart merge for YAML files |
117
+ | [rbs-merge][rbs-merge] | RBS | [tree-sitter-bash][ts-rbs] (via tree_haver), [RBS][rbs] (`rbs` std lib gem) | Smart merge for Ruby type signatures |
118
+ | [toml-merge][toml-merge] | TOML | [Citrus + toml-rb][toml-rb] (default, via tree_haver), [tree-sitter-toml][ts-toml] (via tree_haver) | Smart merge for TOML files |
119
+
120
+ **Example implementations** for the gem templating use case:
121
+
122
+ | Gem | Purpose | Description |
123
+ | --- | --- | --- |
124
+ | [kettle-dev](https://github.com/kettle-rb/kettle-dev) | Gem Development | Gem templating tool using `*-merge` gems |
125
+ | [kettle-jem](https://github.com/kettle-rb/kettle-jem) | Gem Templating | Gem template library with smart merge support |
126
+
127
+ [tree_haver]: https://github.com/kettle-rb/tree_haver
128
+ [ast-merge]: https://github.com/kettle-rb/ast-merge
129
+ [prism-merge]: https://github.com/kettle-rb/prism-merge
130
+ [psych-merge]: https://github.com/kettle-rb/psych-merge
131
+ [json-merge]: https://github.com/kettle-rb/json-merge
132
+ [jsonc-merge]: https://github.com/kettle-rb/jsonc-merge
133
+ [bash-merge]: https://github.com/kettle-rb/bash-merge
134
+ [rbs-merge]: https://github.com/kettle-rb/rbs-merge
135
+ [dotenv-merge]: https://github.com/kettle-rb/dotenv-merge
136
+ [toml-merge]: https://github.com/kettle-rb/toml-merge
137
+ [markdown-merge]: https://github.com/kettle-rb/markdown-merge
138
+ [markly-merge]: https://github.com/kettle-rb/markly-merge
139
+ [commonmarker-merge]: https://github.com/kettle-rb/commonmarker-merge
140
+ [kettle-dev]: https://github.com/kettle-rb/kettle-dev
141
+ [kettle-jem]: https://github.com/kettle-rb/kettle-jem
142
+ [prism]: https://github.com/ruby/prism
143
+ [psych]: https://github.com/ruby/psych
144
+ [ts-json]: https://github.com/tree-sitter/tree-sitter-json
145
+ [ts-bash]: https://github.com/tree-sitter/tree-sitter-bash
146
+ [ts-toml]: https://github.com/tree-sitter-grammars/tree-sitter-toml
147
+ [rbs]: https://github.com/ruby/rbs
148
+ [toml-rb]: https://github.com/emancu/toml-rb
149
+ [markly]: https://github.com/ioquatix/markly
150
+ [commonmarker]: https://github.com/gjtorikian/commonmarker
151
+
152
+
153
+ The `*-merge` gem family provides intelligent, AST-based merging for various file formats. At the foundation is [tree_haver][tree_haver], which provides a unified cross-Ruby parsing API that works seamlessly across MRI, JRuby, and TruffleRuby.
154
+
155
+
156
+ [ts-jsonc]: https://gitlab.com/WhyNotHugo/tree-sitter-jsonc
157
+ [dotenv]: https://github.com/bkeepers/dotenv
158
+
159
+ ## 💡 Info you can shake a stick at
160
+
161
+ | Tokens to Remember | [![Gem name](https://img.shields.io/badge/name-json--merge-3C2D2D.svg?style=square&logo=rubygems&logoColor=red)](https://bestgems.org/gems/json-merge) [![Gem namespace](https://img.shields.io/badge/namespace-Json::Merge-3C2D2D.svg?style=square&logo=ruby&logoColor=white)](https://github.com/kettle-rb/json-merge) |
162
+ | --- | --- |
163
+ | Works with JRuby | [![JRuby 10.0 Compat](https://img.shields.io/badge/JRuby-current-FBE742?style=for-the-badge&logo=ruby&logoColor=green)](https://github.com/kettle-rb/json-merge/actions/workflows/current.yml) [![JRuby HEAD Compat](https://img.shields.io/badge/JRuby-HEAD-FBE742?style=for-the-badge&logo=ruby&logoColor=blue)](https://github.com/kettle-rb/json-merge/actions/workflows/heads.yml) |
164
+ | Works with Truffle Ruby | [![Truffle Ruby 23.1 Compat](https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink)](https://github.com/kettle-rb/json-merge/actions/workflows/truffle.yml) [![Truffle Ruby 24.1 Compat](https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green)](https://github.com/kettle-rb/json-merge/actions/workflows/current.yml) |
165
+ | Works with MRI Ruby 3 | [![Ruby 3.2 Compat](https://img.shields.io/badge/Ruby-3.2-CC342D?style=for-the-badge&logo=ruby&logoColor=white)](https://github.com/kettle-rb/json-merge/actions/workflows/supported.yml) [![Ruby 3.3 Compat](https://img.shields.io/badge/Ruby-3.3-CC342D?style=for-the-badge&logo=ruby&logoColor=white)](https://github.com/kettle-rb/json-merge/actions/workflows/supported.yml) [![Ruby 3.4 Compat](https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green)](https://github.com/kettle-rb/json-merge/actions/workflows/current.yml) [![Ruby HEAD Compat](https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue)](https://github.com/kettle-rb/json-merge/actions/workflows/heads.yml) |
166
+ | Support & Community | [![Join Me on Daily.dev's RubyFriends](https://img.shields.io/badge/daily.dev-%F0%9F%92%8E_Ruby_Friends-0A0A0A?style=for-the-badge&logo=dailydotdev&logoColor=white)](https://app.daily.dev/squads/rubyfriends) [![Live Chat on Discord](https://img.shields.io/discord/1373797679469170758?style=for-the-badge&logo=discord)](https://discord.gg/3qme4XHNKN) [![Get help from me on Upwork](https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white)](https://www.upwork.com/freelancers/~014942e9b056abdf86?mp_source=share) [![Get help from me on Codementor](https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white)](https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github) |
167
+ | Source | [![Source on GitLab.com](https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange)](https://gitlab.com/kettle-rb/json-merge/) [![Source on CodeBerg.org](https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue)](https://codeberg.org/kettle-rb/json-merge) [![Source on Github.com](https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=Github&logoColor=green)](https://github.com/kettle-rb/json-merge) [![The best SHA: dQw4w9WgXcQ\!](https://img.shields.io/badge/KLOC-4.308-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue)](https://www.youtube.com/watch?v=dQw4w9WgXcQ) |
168
+ | Documentation | [![Current release on RubyDoc.info](https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white)](http://rubydoc.info/gems/json-merge) [![YARD on Galtzo.com](https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white)](https://json-merge.galtzo.com) [![Maintainer Blog](https://img.shields.io/badge/blog-railsbling-0093D0.svg?style=for-the-badge&logo=rubyonrails&logoColor=orange)](http://www.railsbling.com/tags/json-merge) [![GitLab Wiki](https://img.shields.io/badge/wiki-examples-943CD2.svg?style=for-the-badge&logo=gitlab&logoColor=white)](https://gitlab.com/kettle-rb/json-merge/-/wikis/home) [![GitHub Wiki](https://img.shields.io/badge/wiki-examples-943CD2.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/kettle-rb/json-merge/wiki) |
169
+ | Compliance | [![License: MIT](https://img.shields.io/badge/License-MIT-259D6C.svg)](https://opensource.org/licenses/MIT) [![Compatible with Apache Software Projects: Verified by SkyWalking Eyes](https://img.shields.io/badge/Apache_Compatible:_Category_A-%E2%9C%93-259D6C.svg?style=flat&logo=Apache)](https://dev.to/galtzo/how-to-check-license-compatibility-41h0) [![📄ilo-declaration-img](https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat)](https://www.ilo.org/declaration/lang--en/index.htm) [![Security Policy](https://img.shields.io/badge/security-policy-259D6C.svg?style=flat)](SECURITY.md) [![Contributor Covenant 2.1](https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg)](CODE_OF_CONDUCT.md) [![SemVer 2.0.0](https://img.shields.io/badge/semver-2.0.0-259D6C.svg?style=flat)](https://semver.org/spec/v2.0.0.html) |
170
+ | Style | [![Enforced Code Style Linter](https://img.shields.io/badge/code_style_&_linting-rubocop--lts-34495e.svg?plastic&logo=ruby&logoColor=white)](https://github.com/rubocop-lts/rubocop-lts) [![Keep-A-Changelog 1.0.0](https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat)](https://keepachangelog.com/en/1.0.0/) [![Gitmoji Commits](https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square)](https://gitmoji.dev) [![Compatibility appraised by: appraisal2](https://img.shields.io/badge/appraised_by-appraisal2-34495e.svg?plastic&logo=ruby&logoColor=white)](https://github.com/appraisal-rb/appraisal2) |
171
+ | Maintainer 🎖️ | [![Follow Me on LinkedIn](https://img.shields.io/badge/PeterBoling-LinkedIn-0B66C2?style=flat&logo=newjapanprowrestling)](http://www.linkedin.com/in/peterboling) [![Follow Me on Ruby.Social](https://img.shields.io/mastodon/follow/109447111526622197?domain=https://ruby.social&style=flat&logo=mastodon&label=Ruby%20@galtzo)](https://ruby.social/@galtzo) [![Follow Me on Bluesky](https://img.shields.io/badge/@galtzo.com-0285FF?style=flat&logo=bluesky&logoColor=white)](https://bsky.app/profile/galtzo.com) [![Contact Maintainer](https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red)](http://www.railsbling.com/contact) [![My technical writing](https://img.shields.io/badge/dev.to-0A0A0A?style=flat&logo=devdotto&logoColor=white)](https://dev.to/galtzo) |
172
+ | `...` 💖 | [![Find Me on WellFound:](https://img.shields.io/badge/peter--boling-orange?style=flat&logo=wellfound)](https://wellfound.com/u/peter-boling) [![Find Me on CrunchBase](https://img.shields.io/badge/peter--boling-purple?style=flat&logo=crunchbase)](https://www.crunchbase.com/person/peter-boling) [![My LinkTree](https://img.shields.io/badge/galtzo-purple?style=flat&logo=linktree)](https://linktr.ee/galtzo) [![More About Me](https://img.shields.io/badge/about.me-0A0A0A?style=flat&logo=aboutme&logoColor=white)](https://about.me/peter.boling) [🧊](https://codeberg.org/pboling) [🐙](https://github.org/pboling) [🛖](https://sr.ht/~galtzo/) [🧪](https://gitlab.com/pboling) |
173
+
174
+ ### Compatibility
175
+
176
+ Compatible with MRI Ruby 3.2.0+, and concordant releases of JRuby, and TruffleRuby.
177
+
178
+ | 🚚 *Amazing* test matrix was brought to you by | 🔎 appraisal2 🔎 and the color 💚 green 💚 |
179
+ | --- | --- |
180
+ | 👟 Check it out\! | ✨ [github.com/appraisal-rb/appraisal2](https://github.com/appraisal-rb/appraisal2) ✨ |
181
+
182
+ ### Federated DVCS
183
+
184
+ <details markdown="1">
185
+ <summary>Find this repo on federated forges (Coming soon!)</summary>
186
+
187
+ | Federated [DVCS](https://railsbling.com/posts/dvcs/put_the_d_in_dvcs/) Repository | Status | Issues | PRs | Wiki | CI | Discussions |
188
+ | --- | --- | --- | --- | --- | --- | --- |
189
+ | 🧪 [kettle-rb/json-merge on GitLab](https://gitlab.com/kettle-rb/json-merge/) | The Truth | [💚](https://gitlab.com/kettle-rb/json-merge/-/issues) | [💚](https://gitlab.com/kettle-rb/json-merge/-/merge_requests) | [💚](https://gitlab.com/kettle-rb/json-merge/-/wikis/home) | 🐭 Tiny Matrix | ➖ |
190
+ | 🧊 [kettle-rb/json-merge on CodeBerg](https://codeberg.org/kettle-rb/json-merge) | An Ethical Mirror ([Donate](https://donate.codeberg.org/)) | [💚](https://codeberg.org/kettle-rb/json-merge/issues) | [💚](https://codeberg.org/kettle-rb/json-merge/pulls) | ➖ | ⭕️ No Matrix | ➖ |
191
+ | 🐙 [kettle-rb/json-merge on GitHub](https://github.com/kettle-rb/json-merge) | Another Mirror | [💚](https://github.com/kettle-rb/json-merge/issues) | [💚](https://github.com/kettle-rb/json-merge/pulls) | [💚](https://github.com/kettle-rb/json-merge/wiki) | 💯 Full Matrix | [💚](https://github.com/kettle-rb/json-merge/discussions) |
192
+ | 🎮️ [Discord Server](https://discord.gg/3qme4XHNKN) | [![Live Chat on Discord](https://img.shields.io/discord/1373797679469170758?style=for-the-badge&logo=discord)](https://discord.gg/3qme4XHNKN) | [Let's](https://discord.gg/3qme4XHNKN) | [talk](https://discord.gg/3qme4XHNKN) | [about](https://discord.gg/3qme4XHNKN) | [this](https://discord.gg/3qme4XHNKN) | [library\!](https://discord.gg/3qme4XHNKN) |
193
+
194
+ </details>
195
+
196
+ [gh-discussions]: https://github.com/kettle-rb/json-merge/discussions
197
+
198
+ ### Enterprise Support [![Tidelift](https://tidelift.com/badges/package/rubygems/json-merge)](https://tidelift.com/subscription/pkg/rubygems-json-merge?utm_source=rubygems-json-merge&utm_medium=referral&utm_campaign=readme)
199
+
200
+ Available as part of the Tidelift Subscription.
201
+
202
+ <details markdown="1">
203
+ <summary>Need enterprise-level guarantees?</summary>
204
+
205
+ The maintainers of this and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.
206
+
207
+ [![Get help from me on Tidelift](https://img.shields.io/badge/Tidelift_and_Sonar-Enterprise_Support-FD3456?style=for-the-badge&logo=sonar&logoColor=white)](https://tidelift.com/subscription/pkg/rubygems-json-merge?utm_source=rubygems-json-merge&utm_medium=referral&utm_campaign=readme)
208
+
209
+ - 💡Subscribe for support guarantees covering *all* your FLOSS dependencies
210
+
211
+ - 💡Tidelift is part of [Sonar](https://blog.tidelift.com/tidelift-joins-sonar)
212
+
213
+ - 💡Tidelift pays maintainers to maintain the software you depend on\!<br/>📊`@`Pointy Haired Boss: An [enterprise support](https://tidelift.com/subscription/pkg/rubygems-json-merge?utm_source=rubygems-json-merge&utm_medium=referral&utm_campaign=readme) subscription is "[never gonna let you down](https://www.youtube.com/watch?v=dQw4w9WgXcQ)", and *supports* open source maintainers
214
+ Alternatively:
215
+
216
+ - [![Live Chat on Discord](https://img.shields.io/discord/1373797679469170758?style=for-the-badge&logo=discord)](https://discord.gg/3qme4XHNKN)
217
+
218
+ - [![Get help from me on Upwork](https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white)](https://www.upwork.com/freelancers/~014942e9b056abdf86?mp_source=share)
219
+
220
+ - [![Get help from me on Codementor](https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white)](https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github)
221
+ </details>
222
+
223
+ ## ✨ Installation
224
+
225
+ Install the gem and add to the application's Gemfile by executing:
226
+
227
+ ``` console
228
+ bundle add json-merge
229
+ ```
230
+
231
+ If bundler is not being used to manage dependencies, install the gem by executing:
232
+
233
+ ``` console
234
+ gem install json-merge
235
+ ```
236
+
237
+ ### 🔒 Secure Installation
238
+
239
+ <details markdown="1">
240
+ <summary>For Medium or High Security Installations</summary>
241
+
242
+ This gem is cryptographically signed, and has verifiable [SHA-256 and SHA-512](https://gitlab.com/kettle-rb/json-merge/-/tree/main/checksums) checksums by
243
+ [stone\_checksums](https://github.com/galtzo-floss/stone_checksums). Be sure the gem you install hasn’t been tampered with
244
+ by following the instructions below.
245
+
246
+ Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate:
247
+
248
+ ``` console
249
+ gem cert --add <(curl -Ls https://raw.github.com/galtzo-floss/certs/main/pboling.pem)
250
+ ```
251
+
252
+ You only need to do that once. Then proceed to install with:
253
+
254
+ ``` console
255
+ gem install json-merge -P HighSecurity
256
+ ```
257
+
258
+ The `HighSecurity` trust profile will verify signed gems, and not allow the installation of unsigned dependencies.
259
+
260
+ If you want to up your security game full-time:
261
+
262
+ ``` console
263
+ bundle config set --global trust-policy MediumSecurity
264
+ ```
265
+
266
+ `MediumSecurity` instead of `HighSecurity` is necessary if not all the gems you use are signed.
267
+
268
+ NOTE: Be prepared to track down certs for signed gems and add them the same way you added mine.
269
+
270
+ </details>
271
+
272
+ ### 🌳 Tree-Sitter Parser Installation
273
+
274
+ This gem requires the `tree-sitter-json` parser library to be installed on your system.
275
+ The parser is a native shared library (`.so` on Linux, `.dylib` on macOS) that provides
276
+ JSON syntax parsing capabilities. For JSONC (JSON with Comments) support, use the
277
+ [jsonc-merge](https://github.com/kettle-rb/jsonc-merge) gem instead.
278
+
279
+ #### Option 1: Pre-built Binaries (Recommended)
280
+
281
+ Download pre-built parsers from [Faveod/tree-sitter-parsers](https://github.com/Faveod/tree-sitter-parsers/releases):
282
+
283
+ **Linux (x64):**
284
+ ``` console
285
+ # Download and extract
286
+ curl -Lo parsers.tar.gz https://github.com/Faveod/tree-sitter-parsers/releases/download/v4.10/tree-sitter-parsers-4.10-linux-x64.tar.gz
287
+ tar -xzf parsers.tar.gz
288
+
289
+ # Install system-wide (requires sudo)
290
+ sudo cp libtree-sitter-json.so /usr/lib/
291
+ sudo ldconfig
292
+
293
+ # Or install locally and set environment variable
294
+ mkdir -p ~/.local/lib/tree-sitter
295
+ cp libtree-sitter-json.so ~/.local/lib/tree-sitter/
296
+ export TREE_SITTER_JSON_PATH="$HOME/.local/lib/tree-sitter/libtree-sitter-json.so"
297
+ ```
298
+
299
+ **Debian/Ubuntu (amd64):**
300
+ ``` console
301
+ curl -Lo parsers.deb https://github.com/Faveod/tree-sitter-parsers/releases/download/v4.10/tree-sitter-parsers-4.10-amd64.deb
302
+ sudo dpkg -i parsers.deb
303
+ ```
304
+
305
+ **macOS (Apple Silicon):**
306
+ ``` console
307
+ curl -Lo parsers.tar.gz https://github.com/Faveod/tree-sitter-parsers/releases/download/v4.10/tree-sitter-parsers-4.10-macos-arm64.tar.gz
308
+ tar -xzf parsers.tar.gz
309
+
310
+ # Install to a location and set environment variable
311
+ mkdir -p ~/.local/lib/tree-sitter
312
+ cp libtree-sitter-json.dylib ~/.local/lib/tree-sitter/
313
+ export TREE_SITTER_JSON_PATH="$HOME/.local/lib/tree-sitter/libtree-sitter-json.dylib"
314
+ ```
315
+
316
+ #### Option 2: Build from Source
317
+
318
+ ``` console
319
+ git clone https://github.com/tree-sitter/tree-sitter-json.git
320
+ cd tree-sitter-json
321
+ make
322
+ sudo cp libtree-sitter-json.so /usr/lib/ # Linux
323
+ # or
324
+ sudo cp libtree-sitter-json.dylib /usr/local/lib/ # macOS
325
+ ```
326
+
327
+ #### Option 3: Package Manager
328
+
329
+ Some package managers provide tree-sitter parsers:
330
+
331
+ **Fedora Atomic (Silverblue, Kinoite, Bazzite, Aurora, etc.):**
332
+ ``` console
333
+ # Install via rpm-ostree (requires reboot)
334
+ rpm-ostree install libtree-sitter-json
335
+
336
+ # The library will be installed to /usr/lib64/libtree-sitter-json.so
337
+ # You may need to set the environment variable:
338
+ export TREE_SITTER_JSON_PATH="/usr/lib64/libtree-sitter-json.so"
339
+ ```
340
+
341
+ **Fedora (traditional):**
342
+ ``` console
343
+ sudo dnf install libtree-sitter-json
344
+ ```
345
+
346
+ **Arch Linux:**
347
+ ``` console
348
+ # Check AUR for tree-sitter-json
349
+ yay -S tree-sitter-json
350
+ ```
351
+
352
+ #### Environment Variable
353
+
354
+ If the parser is not in a standard location (`/usr/lib/`, `/usr/lib64/`, `/usr/local/lib/`),
355
+ set the `TREE_SITTER_JSON_PATH` environment variable to point to the parser library:
356
+
357
+ ``` console
358
+ export TREE_SITTER_JSON_PATH="/path/to/libtree-sitter-json.so"
359
+ ```
360
+
361
+ **Note:** Some distributions install the library with a version number suffix
362
+ (e.g., `libtree-sitter-json.so.14` instead of `libtree-sitter-json.so`).
363
+ If the gem can't find the parser, check for versioned files and either:
364
+ - Set `TREE_SITTER_JSON_PATH` to the full versioned path, or
365
+ - Create a symlink: `sudo ln -s /usr/lib64/libtree-sitter-json.so.14 /usr/lib64/libtree-sitter-json.so`
366
+ Add this to your shell profile (`.bashrc`, `.zshrc`, etc.) for persistence.
367
+ ### 💎 Ruby Interface Gems
368
+
369
+ In addition to the tree-sitter parser library, you need a Ruby gem that provides
370
+ bindings to tree-sitter. Choose **one** of the following based on your Ruby implementation:
371
+
372
+ | Gem | Ruby Support | Description |
373
+ | --- | --- | --- |
374
+ | [ruby\_tree\_sitter](https://github.com/Faveod/ruby_tree_sitter) | MRI only | C extension bindings (recommended for MRI) |
375
+ | [tree\_stump](https://github.com/nickstenning/tree_stump) | MRI (maybe JRuby) | Rust-based bindings via Rutie |
376
+ | [ffi](https://github.com/ffi/ffi) | MRI, JRuby, TruffleRuby | Generic FFI bindings (used by tree\_haver's FFI backend) |
377
+
378
+ [ruby_tree_sitter]: https://github.com/Faveod/ruby_tree_sitter
379
+ [tree_stump]: https://github.com/nickstenning/tree_stump
380
+ [ffi]: https://github.com/ffi/ffi
381
+
382
+ #### For MRI Ruby (Recommended)
383
+
384
+ ``` console
385
+ gem install ruby_tree_sitter
386
+ ```
387
+
388
+ Or add to your Gemfile:
389
+
390
+ ``` ruby
391
+ gem "ruby_tree_sitter", "~> 2.0"
392
+ ```
393
+
394
+ #### For JRuby or TruffleRuby
395
+
396
+ ``` console
397
+ gem install ffi
398
+ ```
399
+
400
+ Or add to your Gemfile:
401
+
402
+ ``` ruby
403
+ gem "ffi"
404
+ ```
405
+
406
+ The `tree_haver` gem (a dependency of json-merge) will automatically detect and use
407
+ the appropriate backend based on which gems are available.
408
+
409
+ **Note:** The `ruby_tree_sitter` gem only compiles on MRI Ruby. For JRuby or TruffleRuby,
410
+ you must use the FFI backend.
411
+
412
+ ## ⚙️ Configuration
413
+
414
+ ### Signature Match Preference
415
+
416
+ Control which version to use when nodes have matching signatures but different content:
417
+
418
+ ``` ruby
419
+ # Use template version (for config updates)
420
+ merger = Json::Merge::SmartMerger.new(
421
+ template,
422
+ destination,
423
+ preference: :template,
424
+ )
425
+
426
+ # Use destination version (default - preserve customizations)
427
+ merger = Json::Merge::SmartMerger.new(
428
+ template,
429
+ destination,
430
+ preference: :destination,
431
+ )
432
+ ```
433
+
434
+ ### Template-Only Nodes
435
+
436
+ Control whether to add nodes that only exist in the template:
437
+
438
+ ``` ruby
439
+ # Add template-only nodes
440
+ merger = Json::Merge::SmartMerger.new(
441
+ template,
442
+ destination,
443
+ add_template_only_nodes: true,
444
+ )
445
+ ```
446
+
447
+ ### Object Match Refiner
448
+
449
+ When JSON object properties (key-value pairs) don't match by exact key name, the
450
+ `ObjectMatchRefiner` uses fuzzy matching to pair entries with:
451
+
452
+ - Similar key names (e.g., `databaseUrl` vs `database_url`)
453
+ - Keys with typos or different naming conventions (camelCase vs snake\_case)
454
+ - Array elements with similar structure or content
455
+ <!-- end list -->
456
+ ``` ruby
457
+ # Enable object fuzzy matching
458
+ merger = Json::Merge::SmartMerger.new(
459
+ template,
460
+ destination,
461
+ match_refiners: [
462
+ Json::Merge::ObjectMatchRefiner.new(threshold: 0.5),
463
+ ],
464
+ )
465
+ ```
466
+
467
+ #### ObjectMatchRefiner Options
468
+
469
+ | Option | Default | Description |
470
+ | --- | --- | --- |
471
+ | `threshold` | 0.5 | Minimum similarity score (0.0-1.0) to accept a match |
472
+ | `key_weight` | 0.7 | Weight for key name similarity |
473
+ | `value_weight` | 0.3 | Weight for value similarity |
474
+
475
+ ``` ruby
476
+ # Custom weights for key-centric matching
477
+ refiner = Json::Merge::ObjectMatchRefiner.new(
478
+ threshold: 0.6,
479
+ key_weight: 0.8, # Focus more on key names
480
+ value_weight: 0.2, # Less focus on values
481
+ )
482
+ ```
483
+
484
+ ### Debug Logging
485
+
486
+ Enable debug logging to see merge decisions:
487
+
488
+ ``` bash
489
+ export JSON_MERGE_DEBUG=1
490
+ ```
491
+
492
+ ## 🔧 Basic Usage
493
+
494
+ ### Merging Two JSON Files
495
+
496
+ ``` ruby
497
+ require "json/merge"
498
+
499
+ template_content = File.read("template.json")
500
+ dest_content = File.read("destination.json")
501
+
502
+ merger = Json::Merge::SmartMerger.new(template_content, dest_content)
503
+ result = merger.merge
504
+
505
+ File.write("merged.json", result.to_json)
506
+ ```
507
+
508
+ ### Analyzing a JSON File
509
+
510
+ ``` ruby
511
+ require "json/merge"
512
+
513
+ source = File.read("config.json")
514
+ analysis = Json::Merge::FileAnalysis.new(source)
515
+
516
+ # Iterate over all top-level nodes
517
+ analysis.statements.each do |node|
518
+ sig = analysis.generate_signature(node)
519
+ puts "#{node.class}: #{sig.inspect}"
520
+ end
521
+ ```
522
+
523
+ ### Fuzzy Property Matching
524
+
525
+ When property names differ between template and destination (e.g., naming convention changes),
526
+ use the `ObjectMatchRefiner`:
527
+
528
+ ``` ruby
529
+ require "json/merge"
530
+
531
+ template = <<~JSON
532
+ {
533
+ "databaseUrl": "postgres://localhost/app",
534
+ "cacheTimeout": 3600,
535
+ "apiEndpoint": "https://api.example.com"
536
+ }
537
+ JSON
538
+
539
+ destination = <<~JSON
540
+ {
541
+ "database_url": "postgres://localhost/custom",
542
+ "cache_ttl": 7200,
543
+ "api_endpoint": "https://custom.example.com"
544
+ }
545
+ JSON
546
+
547
+ # Default merge won't match keys (names differ - camelCase vs snake_case)
548
+ # Use ObjectMatchRefiner for fuzzy matching
549
+ merger = Json::Merge::SmartMerger.new(
550
+ template,
551
+ destination,
552
+ match_refiners: [
553
+ Json::Merge::ObjectMatchRefiner.new(threshold: 0.5),
554
+ ],
555
+ )
556
+ result = merger.merge
557
+
558
+ # Properties are matched despite naming convention differences:
559
+ # - databaseUrl ↔ database_url (similar when normalized)
560
+ # - cacheTimeout ↔ cache_ttl (similar: "cache")
561
+ # - apiEndpoint ↔ api_endpoint (similar when normalized)
562
+ ```
563
+
564
+ ### Array Element Matching
565
+
566
+ The `ObjectMatchRefiner` also handles array elements with similar structure:
567
+
568
+ ``` ruby
569
+ template = <<~JSON
570
+ {
571
+ "users": [
572
+ { "id": 1, "userName": "alice" },
573
+ { "id": 2, "userName": "bob" }
574
+ ]
575
+ }
576
+ JSON
577
+
578
+ destination = <<~JSON
579
+ {
580
+ "users": [
581
+ { "id": 1, "user_name": "alice_custom" },
582
+ { "id": 3, "user_name": "charlie" }
583
+ ]
584
+ }
585
+ JSON
586
+
587
+ merger = Json::Merge::SmartMerger.new(
588
+ template,
589
+ destination,
590
+ match_refiners: [
591
+ Json::Merge::ObjectMatchRefiner.new(threshold: 0.5),
592
+ ],
593
+ )
594
+ # Array elements with matching IDs or similar structure are paired
595
+ ```
596
+
597
+ ## 🦷 FLOSS Funding
598
+
599
+ While kettle-rb tools are free software and will always be, the project would benefit immensely from some funding.
600
+ Raising a monthly budget of... "dollars" would make the project more sustainable.
601
+
602
+ We welcome both individual and corporate sponsors\! We also offer a
603
+ wide array of funding channels to account for your preferences
604
+ (although currently [Open Collective](https://opencollective.com/kettle-rb) is our preferred funding platform).
605
+
606
+ **If you're working in a company that's making significant use of kettle-rb tools we'd
607
+ appreciate it if you suggest to your company to become a kettle-rb sponsor.**
608
+
609
+ You can support the development of kettle-rb tools via
610
+ [GitHub Sponsors](https://github.com/sponsors/pboling),
611
+ [Liberapay](https://liberapay.com/pboling/donate),
612
+ [PayPal](https://www.paypal.com/paypalme/peterboling),
613
+ [Open Collective](https://opencollective.com/kettle-rb)
614
+ and [Tidelift](https://tidelift.com/subscription/pkg/rubygems-json-merge?utm_source=rubygems-json-merge&utm_medium=referral&utm_campaign=readme).
615
+
616
+ | 📍 NOTE |
617
+ | --- |
618
+ | If doing a sponsorship in the form of donation is problematic for your company <br/> from an accounting standpoint, we'd recommend the use of Tidelift, <br/> where you can get a support-like subscription instead. |
619
+
620
+ ### Open Collective for Individuals
621
+
622
+ Support us with a monthly donation and help us continue our activities. \[[Become a backer](https://opencollective.com/kettle-rb#backer)\]
623
+
624
+ NOTE: [kettle-readme-backers](https://github.com/kettle-rb/json-merge/blob/main/exe/kettle-readme-backers) updates this list every day, automatically.
625
+
626
+ <!-- OPENCOLLECTIVE-INDIVIDUALS:START -->
627
+ No backers yet. Be the first\!
628
+ <!-- OPENCOLLECTIVE-INDIVIDUALS:END -->
629
+
630
+ ### Open Collective for Organizations
631
+
632
+ Become a sponsor and get your logo on our README on GitHub with a link to your site. \[[Become a sponsor](https://opencollective.com/kettle-rb#sponsor)\]
633
+
634
+ NOTE: [kettle-readme-backers](https://github.com/kettle-rb/json-merge/blob/main/exe/kettle-readme-backers) updates this list every day, automatically.
635
+
636
+ <!-- OPENCOLLECTIVE-ORGANIZATIONS:START -->
637
+ No sponsors yet. Be the first\!
638
+ <!-- OPENCOLLECTIVE-ORGANIZATIONS:END -->
639
+
640
+ [kettle-readme-backers]: https://github.com/kettle-rb/json-merge/blob/main/exe/kettle-readme-backers
641
+
642
+ ### Another way to support open-source
643
+
644
+ I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).
645
+
646
+ If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in `bundle fund`.
647
+
648
+ I’m developing a new library, [floss\_funding](https://github.com/galtzo-floss/floss_funding), designed to empower open-source developers like myself to get paid for the work we do, in a sustainable way. Please give it a look.
649
+
650
+ **[Floss-Funding.dev](https://floss-funding.dev): 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags**
651
+
652
+ [![OpenCollective Backers](https://opencollective.com/kettle-rb/backers/badge.svg?style=flat)](https://opencollective.com/kettle-rb#backer) [![OpenCollective Sponsors](https://opencollective.com/kettle-rb/sponsors/badge.svg?style=flat)](https://opencollective.com/kettle-rb#sponsor) [![Sponsor Me on Github](https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github)](https://github.com/sponsors/pboling) [![Liberapay Goal Progress](https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat)](https://liberapay.com/pboling/donate) [![Donate on PayPal](https://img.shields.io/badge/donate-paypal-a51611.svg?style=flat&logo=paypal)](https://www.paypal.com/paypalme/peterboling) [![Buy me a coffee](https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat)](https://www.buymeacoffee.com/pboling) [![Donate on Polar](https://img.shields.io/badge/polar-donate-a51611.svg?style=flat)](https://polar.sh/pboling) [![Donate to my FLOSS efforts at ko-fi.com](https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg?style=flat)](https://ko-fi.com/O5O86SNP4) [![Donate to my FLOSS efforts using Patreon](https://img.shields.io/badge/patreon-donate-a51611.svg?style=flat)](https://patreon.com/galtzo)
653
+
654
+ ## 🔐 Security
655
+
656
+ See [SECURITY.md](SECURITY.md).
657
+
658
+ ## 🤝 Contributing
659
+
660
+ If you need some ideas of where to help, you could work on adding more code coverage,
661
+ or if it is already 💯 (see [below](#code-coverage)) check [reek](REEK), [issues](https://github.com/kettle-rb/json-merge/issues), or [PRs](https://github.com/kettle-rb/json-merge/pulls),
662
+ or use the gem and think about how it could be better.
663
+
664
+ We [![Keep A Changelog](https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat)](https://keepachangelog.com/en/1.0.0/) so if you make changes, remember to update it.
665
+
666
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for more detailed instructions.
667
+
668
+ ### 🚀 Release Instructions
669
+
670
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
671
+
672
+ ### Code Coverage
673
+
674
+ [![Coverage Graph](https://codecov.io/gh/kettle-rb/json-merge/graphs/tree.svg)](https://codecov.io/gh/kettle-rb/json-merge)
675
+
676
+ [![Coveralls Test Coverage](https://coveralls.io/repos/github/kettle-rb/json-merge/badge.svg?branch=main)](https://coveralls.io/github/kettle-rb/json-merge?branch=main)
677
+
678
+ [![QLTY Test Coverage](https://qlty.sh/gh/kettle-rb/projects/json-merge/coverage.svg)](https://qlty.sh/gh/kettle-rb/projects/json-merge/metrics/code?sort=coverageRating)
679
+
680
+ ### 🪇 Code of Conduct
681
+
682
+ Everyone interacting with this project's codebases, issue trackers,
683
+ chat rooms and mailing lists agrees to follow the [![Contributor Covenant 2.1](https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg)](CODE_OF_CONDUCT.md).
684
+
685
+ ## 🌈 Contributors
686
+
687
+ [![Contributors](https://contrib.rocks/image?repo=kettle-rb/json-merge)](https://github.com/kettle-rb/json-merge/graphs/contributors)
688
+
689
+ Made with [contributors-img](https://contrib.rocks).
690
+
691
+ Also see GitLab Contributors: <https://gitlab.com/kettle-rb/json-merge/-/graphs/main>
692
+
693
+ <details>
694
+ <summary>⭐️ Star History</summary>
695
+
696
+ <a href="https://star-history.com/#kettle-rb/json-merge&Date">
697
+ <picture>
698
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=kettle-rb/json-merge&type=Date&theme=dark" />
699
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=kettle-rb/json-merge&type=Date" />
700
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=kettle-rb/json-merge&type=Date" />
701
+ </picture>
702
+ </a>
703
+
704
+ </details>
705
+
706
+ ## 📌 Versioning
707
+
708
+ This Library adheres to [![Semantic Versioning 2.0.0](https://img.shields.io/badge/semver-2.0.0-259D6C.svg?style=flat)](https://semver.org/spec/v2.0.0.html).
709
+ Violations of this scheme should be reported as bugs.
710
+ Specifically, if a minor or patch version is released that breaks backward compatibility,
711
+ a new version should be immediately released that restores compatibility.
712
+ Breaking changes to the public API will only be introduced with new major versions.
713
+
714
+ > dropping support for a platform is both obviously and objectively a breaking change <br/>
715
+ > —Jordan Harband ([@ljharb](https://github.com/ljharb), maintainer of SemVer) [in SemVer issue 716](https://github.com/semver/semver/issues/716#issuecomment-869336139)
716
+
717
+ I understand that policy doesn't work universally ("exceptions to every rule\!"),
718
+ but it is the policy here.
719
+ As such, in many cases it is good to specify a dependency on this library using
720
+ the [Pessimistic Version Constraint](http://guides.rubygems.org/patterns/#pessimistic-version-constraint) with two digits of precision.
721
+
722
+ For example:
723
+
724
+ ``` ruby
725
+ spec.add_dependency("json-merge", "~> 1.0")
726
+ ```
727
+
728
+ <details markdown="1">
729
+ <summary>📌 Is "Platform Support" part of the public API? More details inside.</summary>
730
+
731
+ SemVer should, IMO, but doesn't explicitly, say that dropping support for specific Platforms
732
+ is a *breaking change* to an API, and for that reason the bike shedding is endless.
733
+
734
+ To get a better understanding of how SemVer is intended to work over a project's lifetime,
735
+ read this article from the creator of SemVer:
736
+
737
+ - ["Major Version Numbers are Not Sacred"](https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html)
738
+ </details>
739
+
740
+ See [CHANGELOG.md](CHANGELOG.md) for a list of releases.
741
+
742
+ ## 📄 License
743
+
744
+ The gem is available as open source under the terms of
745
+ the [MIT License](LICENSE.txt) [![License: MIT](https://img.shields.io/badge/License-MIT-259D6C.svg)](https://opensource.org/licenses/MIT).
746
+ See [LICENSE.txt](LICENSE.txt) for the official [Copyright Notice](https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year).
747
+
748
+ ### © Copyright
749
+
750
+ <ul>
751
+ <li>
752
+ Copyright (c) 2025 Peter H. Boling, of
753
+ <a href="https://discord.gg/3qme4XHNKN">
754
+ Galtzo.com
755
+ <picture>
756
+ <img src="https://logos.galtzo.com/assets/images/galtzo-floss/avatar-128px-blank.svg" alt="Galtzo.com Logo (Wordless) by Aboling0, CC BY-SA 4.0" width="24">
757
+ </picture>
758
+ </a>, and json-merge contributors.
759
+ </li>
760
+ </ul>
761
+
762
+ ## 🤑 A request for help
763
+
764
+ Maintainers have teeth and need to pay their dentists.
765
+ After getting laid off in an RIF in March, and encountering difficulty finding a new one,
766
+ I began spending most of my time building open source tools.
767
+ I'm hoping to be able to pay for my kids' health insurance this month,
768
+ so if you value the work I am doing, I need your support.
769
+ Please consider sponsoring me or the project.
770
+
771
+ To join the community or get help 👇️ Join the Discord.
772
+
773
+ [![Live Chat on Discord](https://img.shields.io/discord/1373797679469170758?style=for-the-badge&logo=discord)](https://discord.gg/3qme4XHNKN)
774
+
775
+ To say "thanks\!" ☝️ Join the Discord or 👇️ send money.
776
+
777
+ [![Sponsor kettle-rb/json-merge on Open Source Collective](https://img.shields.io/opencollective/all/kettle-rb?style=for-the-badge)](https://opencollective.com/kettle-rb) 💌 [![Sponsor me on GitHub Sponsors](https://img.shields.io/badge/Sponsor_Me!-pboling-blue?style=for-the-badge&logo=github)](https://github.com/sponsors/pboling) 💌 [![Sponsor me on Liberapay](https://img.shields.io/liberapay/goal/pboling.svg?style=for-the-badge&logo=liberapay&color=a51611)](https://liberapay.com/pboling/donate) 💌 [![Donate on PayPal](https://img.shields.io/badge/donate-paypal-a51611.svg?style=for-the-badge&logo=paypal&color=0A0A0A)](https://www.paypal.com/paypalme/peterboling)
778
+
779
+ ### Please give the project a star ⭐ ♥.
780
+
781
+ Thanks for RTFM. ☺️
782
+
783
+ [⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
784
+ [⛳liberapay-bottom-img]: https://img.shields.io/liberapay/goal/pboling.svg?style=for-the-badge&logo=liberapay&color=a51611
785
+ [⛳liberapay]: https://liberapay.com/pboling/donate
786
+ [🖇osc-all-img]: https://img.shields.io/opencollective/all/kettle-rb
787
+ [🖇osc-sponsors-img]: https://img.shields.io/opencollective/sponsors/kettle-rb
788
+ [🖇osc-backers-img]: https://img.shields.io/opencollective/backers/kettle-rb
789
+ [🖇osc-backers]: https://opencollective.com/kettle-rb#backer
790
+ [🖇osc-backers-i]: https://opencollective.com/kettle-rb/backers/badge.svg?style=flat
791
+ [🖇osc-sponsors]: https://opencollective.com/kettle-rb#sponsor
792
+ [🖇osc-sponsors-i]: https://opencollective.com/kettle-rb/sponsors/badge.svg?style=flat
793
+ [🖇osc-all-bottom-img]: https://img.shields.io/opencollective/all/kettle-rb?style=for-the-badge
794
+ [🖇osc-sponsors-bottom-img]: https://img.shields.io/opencollective/sponsors/kettle-rb?style=for-the-badge
795
+ [🖇osc-backers-bottom-img]: https://img.shields.io/opencollective/backers/kettle-rb?style=for-the-badge
796
+ [🖇osc]: https://opencollective.com/kettle-rb
797
+ [🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
798
+ [🖇sponsor-bottom-img]: https://img.shields.io/badge/Sponsor_Me!-pboling-blue?style=for-the-badge&logo=github
799
+ [🖇sponsor]: https://github.com/sponsors/pboling
800
+ [🖇polar-img]: https://img.shields.io/badge/polar-donate-a51611.svg?style=flat
801
+ [🖇polar]: https://polar.sh/pboling
802
+ [🖇kofi-img]: https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg?style=flat
803
+ [🖇kofi]: https://ko-fi.com/O5O86SNP4
804
+ [🖇patreon-img]: https://img.shields.io/badge/patreon-donate-a51611.svg?style=flat
805
+ [🖇patreon]: https://patreon.com/galtzo
806
+ [🖇buyme-small-img]: https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat
807
+ [🖇buyme-img]: https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20latte&emoji=&slug=pboling&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff
808
+ [🖇buyme]: https://www.buymeacoffee.com/pboling
809
+ [🖇paypal-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=flat&logo=paypal
810
+ [🖇paypal-bottom-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=for-the-badge&logo=paypal&color=0A0A0A
811
+ [🖇paypal]: https://www.paypal.com/paypalme/peterboling
812
+ [🖇floss-funding.dev]: https://floss-funding.dev
813
+ [🖇floss-funding-gem]: https://github.com/galtzo-floss/floss_funding
814
+ [✉️discord-invite]: https://discord.gg/3qme4XHNKN
815
+ [✉️discord-invite-img-ftb]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge&logo=discord
816
+ [✉️ruby-friends-img]: https://img.shields.io/badge/daily.dev-%F0%9F%92%8E_Ruby_Friends-0A0A0A?style=for-the-badge&logo=dailydotdev&logoColor=white
817
+ [✉️ruby-friends]: https://app.daily.dev/squads/rubyfriends
818
+
819
+ [✇bundle-group-pattern]: https://gist.github.com/pboling/4564780
820
+ [⛳️gem-namespace]: https://github.com/kettle-rb/json-merge
821
+ [⛳️namespace-img]: https://img.shields.io/badge/namespace-Json::Merge-3C2D2D.svg?style=square&logo=ruby&logoColor=white
822
+ [⛳️gem-name]: https://bestgems.org/gems/json-merge
823
+ [⛳️name-img]: https://img.shields.io/badge/name-json--merge-3C2D2D.svg?style=square&logo=rubygems&logoColor=red
824
+ [⛳️tag-img]: https://img.shields.io/github/tag/kettle-rb/json-merge.svg
825
+ [⛳️tag]: http://github.com/kettle-rb/json-merge/releases
826
+ [🚂maint-blog]: http://www.railsbling.com/tags/json-merge
827
+ [🚂maint-blog-img]: https://img.shields.io/badge/blog-railsbling-0093D0.svg?style=for-the-badge&logo=rubyonrails&logoColor=orange
828
+ [🚂maint-contact]: http://www.railsbling.com/contact
829
+ [🚂maint-contact-img]: https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red
830
+ [💖🖇linkedin]: http://www.linkedin.com/in/peterboling
831
+ [💖🖇linkedin-img]: https://img.shields.io/badge/PeterBoling-LinkedIn-0B66C2?style=flat&logo=newjapanprowrestling
832
+ [💖✌️wellfound]: https://wellfound.com/u/peter-boling
833
+ [💖✌️wellfound-img]: https://img.shields.io/badge/peter--boling-orange?style=flat&logo=wellfound
834
+ [💖💲crunchbase]: https://www.crunchbase.com/person/peter-boling
835
+ [💖💲crunchbase-img]: https://img.shields.io/badge/peter--boling-purple?style=flat&logo=crunchbase
836
+ [💖🐘ruby-mast]: https://ruby.social/@galtzo
837
+ [💖🐘ruby-mast-img]: https://img.shields.io/mastodon/follow/109447111526622197?domain=https://ruby.social&style=flat&logo=mastodon&label=Ruby%20@galtzo
838
+ [💖🦋bluesky]: https://bsky.app/profile/galtzo.com
839
+ [💖🦋bluesky-img]: https://img.shields.io/badge/@galtzo.com-0285FF?style=flat&logo=bluesky&logoColor=white
840
+ [💖🌳linktree]: https://linktr.ee/galtzo
841
+ [💖🌳linktree-img]: https://img.shields.io/badge/galtzo-purple?style=flat&logo=linktree
842
+ [💖💁🏼‍♂️devto]: https://dev.to/galtzo
843
+ [💖💁🏼‍♂️devto-img]: https://img.shields.io/badge/dev.to-0A0A0A?style=flat&logo=devdotto&logoColor=white
844
+ [💖💁🏼‍♂️aboutme]: https://about.me/peter.boling
845
+ [💖💁🏼‍♂️aboutme-img]: https://img.shields.io/badge/about.me-0A0A0A?style=flat&logo=aboutme&logoColor=white
846
+ [💖🧊berg]: https://codeberg.org/pboling
847
+ [💖🐙hub]: https://github.org/pboling
848
+ [💖🛖hut]: https://sr.ht/~galtzo/
849
+ [💖🧪lab]: https://gitlab.com/pboling
850
+ [👨🏼‍🏫expsup-upwork]: https://www.upwork.com/freelancers/~014942e9b056abdf86?mp_source=share
851
+ [👨🏼‍🏫expsup-upwork-img]: https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white
852
+ [👨🏼‍🏫expsup-codementor]: https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github
853
+ [👨🏼‍🏫expsup-codementor-img]: https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white
854
+ [🏙️entsup-tidelift]: https://tidelift.com/subscription/pkg/rubygems-json-merge?utm_source=rubygems-json-merge&utm_medium=referral&utm_campaign=readme
855
+ [🏙️entsup-tidelift-img]: https://img.shields.io/badge/Tidelift_and_Sonar-Enterprise_Support-FD3456?style=for-the-badge&logo=sonar&logoColor=white
856
+ [🏙️entsup-tidelift-sonar]: https://blog.tidelift.com/tidelift-joins-sonar
857
+ [💁🏼‍♂️peterboling]: http://www.peterboling.com
858
+ [🚂railsbling]: http://www.railsbling.com
859
+ [📜src-gl-img]: https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange
860
+ [📜src-gl]: https://gitlab.com/kettle-rb/json-merge/
861
+ [📜src-cb-img]: https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue
862
+ [📜src-cb]: https://codeberg.org/kettle-rb/json-merge
863
+ [📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=Github&logoColor=green
864
+ [📜src-gh]: https://github.com/kettle-rb/json-merge
865
+ [📜docs-cr-rd-img]: https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
866
+ [📜docs-head-rd-img]: https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
867
+ [📜gl-wiki]: https://gitlab.com/kettle-rb/json-merge/-/wikis/home
868
+ [📜gh-wiki]: https://github.com/kettle-rb/json-merge/wiki
869
+ [📜gl-wiki-img]: https://img.shields.io/badge/wiki-examples-943CD2.svg?style=for-the-badge&logo=gitlab&logoColor=white
870
+ [📜gh-wiki-img]: https://img.shields.io/badge/wiki-examples-943CD2.svg?style=for-the-badge&logo=github&logoColor=white
871
+ [👽dl-rank]: https://bestgems.org/gems/json-merge
872
+ [👽dl-ranki]: https://img.shields.io/gem/rd/json-merge.svg
873
+ [👽oss-help]: https://www.codetriage.com/kettle-rb/json-merge
874
+ [👽oss-helpi]: https://www.codetriage.com/kettle-rb/json-merge/badges/users.svg
875
+ [👽version]: https://bestgems.org/gems/json-merge
876
+ [👽versioni]: https://img.shields.io/gem/v/json-merge.svg
877
+ [🏀qlty-mnt]: https://qlty.sh/gh/kettle-rb/projects/json-merge
878
+ [🏀qlty-mnti]: https://qlty.sh/gh/kettle-rb/projects/json-merge/maintainability.svg
879
+ [🏀qlty-cov]: https://qlty.sh/gh/kettle-rb/projects/json-merge/metrics/code?sort=coverageRating
880
+ [🏀qlty-covi]: https://qlty.sh/gh/kettle-rb/projects/json-merge/coverage.svg
881
+ [🏀codecov]: https://codecov.io/gh/kettle-rb/json-merge
882
+ [🏀codecovi]: https://codecov.io/gh/kettle-rb/json-merge/graph/badge.svg
883
+ [🏀coveralls]: https://coveralls.io/github/kettle-rb/json-merge?branch=main
884
+ [🏀coveralls-img]: https://coveralls.io/repos/github/kettle-rb/json-merge/badge.svg?branch=main
885
+ [🖐codeQL]: https://github.com/kettle-rb/json-merge/security/code-scanning
886
+ [🖐codeQL-img]: https://github.com/kettle-rb/json-merge/actions/workflows/codeql-analysis.yml/badge.svg
887
+ [🚎2-cov-wf]: https://github.com/kettle-rb/json-merge/actions/workflows/coverage.yml
888
+ [🚎2-cov-wfi]: https://github.com/kettle-rb/json-merge/actions/workflows/coverage.yml/badge.svg
889
+ [🚎3-hd-wf]: https://github.com/kettle-rb/json-merge/actions/workflows/heads.yml
890
+ [🚎3-hd-wfi]: https://github.com/kettle-rb/json-merge/actions/workflows/heads.yml/badge.svg
891
+ [🚎5-st-wf]: https://github.com/kettle-rb/json-merge/actions/workflows/style.yml
892
+ [🚎5-st-wfi]: https://github.com/kettle-rb/json-merge/actions/workflows/style.yml/badge.svg
893
+ [🚎6-s-wf]: https://github.com/kettle-rb/json-merge/actions/workflows/supported.yml
894
+ [🚎6-s-wfi]: https://github.com/kettle-rb/json-merge/actions/workflows/supported.yml/badge.svg
895
+ [🚎9-t-wf]: https://github.com/kettle-rb/json-merge/actions/workflows/truffle.yml
896
+ [🚎9-t-wfi]: https://github.com/kettle-rb/json-merge/actions/workflows/truffle.yml/badge.svg
897
+ [🚎11-c-wf]: https://github.com/kettle-rb/json-merge/actions/workflows/current.yml
898
+ [🚎11-c-wfi]: https://github.com/kettle-rb/json-merge/actions/workflows/current.yml/badge.svg
899
+ [🚎12-crh-wf]: https://github.com/kettle-rb/json-merge/actions/workflows/dep-heads.yml
900
+ [🚎12-crh-wfi]: https://github.com/kettle-rb/json-merge/actions/workflows/dep-heads.yml/badge.svg
901
+ [🚎13-🔒️-wf]: https://github.com/kettle-rb/json-merge/actions/workflows/locked_deps.yml
902
+ [🚎13-🔒️-wfi]: https://github.com/kettle-rb/json-merge/actions/workflows/locked_deps.yml/badge.svg
903
+ [🚎14-🔓️-wf]: https://github.com/kettle-rb/json-merge/actions/workflows/unlocked_deps.yml
904
+ [🚎14-🔓️-wfi]: https://github.com/kettle-rb/json-merge/actions/workflows/unlocked_deps.yml/badge.svg
905
+ [🚎15-🪪-wf]: https://github.com/kettle-rb/json-merge/actions/workflows/license-eye.yml
906
+ [🚎15-🪪-wfi]: https://github.com/kettle-rb/json-merge/actions/workflows/license-eye.yml/badge.svg
907
+ [💎ruby-3.2i]: https://img.shields.io/badge/Ruby-3.2-CC342D?style=for-the-badge&logo=ruby&logoColor=white
908
+ [💎ruby-3.3i]: https://img.shields.io/badge/Ruby-3.3-CC342D?style=for-the-badge&logo=ruby&logoColor=white
909
+ [💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
910
+ [💎ruby-headi]: https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue
911
+ [💎truby-23.1i]: https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
912
+ [💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green
913
+ [💎truby-headi]: https://img.shields.io/badge/Truffle_Ruby-HEAD-34BCB1?style=for-the-badge&logo=ruby&logoColor=blue
914
+ [💎jruby-c-i]: https://img.shields.io/badge/JRuby-current-FBE742?style=for-the-badge&logo=ruby&logoColor=green
915
+ [💎jruby-headi]: https://img.shields.io/badge/JRuby-HEAD-FBE742?style=for-the-badge&logo=ruby&logoColor=blue
916
+ [🤝gh-issues]: https://github.com/kettle-rb/json-merge/issues
917
+ [🤝gh-pulls]: https://github.com/kettle-rb/json-merge/pulls
918
+ [🤝gl-issues]: https://gitlab.com/kettle-rb/json-merge/-/issues
919
+ [🤝gl-pulls]: https://gitlab.com/kettle-rb/json-merge/-/merge_requests
920
+ [🤝cb-issues]: https://codeberg.org/kettle-rb/json-merge/issues
921
+ [🤝cb-pulls]: https://codeberg.org/kettle-rb/json-merge/pulls
922
+ [🤝cb-donate]: https://donate.codeberg.org/
923
+ [🤝contributing]: CONTRIBUTING.md
924
+ [🏀codecov-g]: https://codecov.io/gh/kettle-rb/json-merge/graphs/tree.svg
925
+ [🖐contrib-rocks]: https://contrib.rocks
926
+ [🖐contributors]: https://github.com/kettle-rb/json-merge/graphs/contributors
927
+ [🖐contributors-img]: https://contrib.rocks/image?repo=kettle-rb/json-merge
928
+ [🚎contributors-gl]: https://gitlab.com/kettle-rb/json-merge/-/graphs/main
929
+ [🪇conduct]: CODE_OF_CONDUCT.md
930
+ [🪇conduct-img]: https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg
931
+ [📌pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
932
+ [📌semver]: https://semver.org/spec/v2.0.0.html
933
+ [📌semver-img]: https://img.shields.io/badge/semver-2.0.0-259D6C.svg?style=flat
934
+ [📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
935
+ [📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
936
+ [📌changelog]: CHANGELOG.md
937
+ [📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
938
+ [📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat
939
+ [📌gitmoji]: https://gitmoji.dev
940
+ [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
941
+ [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
942
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.194-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
943
+ [🔐security]: SECURITY.md
944
+ [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
945
+ [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
946
+ [📄license]: LICENSE.txt
947
+ [📄license-ref]: https://opensource.org/licenses/MIT
948
+ [📄license-img]: https://img.shields.io/badge/License-MIT-259D6C.svg
949
+ [📄license-compat]: https://dev.to/galtzo/how-to-check-license-compatibility-41h0
950
+ [📄license-compat-img]: https://img.shields.io/badge/Apache_Compatible:_Category_A-%E2%9C%93-259D6C.svg?style=flat&logo=Apache
951
+ [📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm
952
+ [📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat
953
+ [🚎yard-current]: http://rubydoc.info/gems/json-merge
954
+ [🚎yard-head]: https://json-merge.galtzo.com
955
+ [💎stone_checksums]: https://github.com/galtzo-floss/stone_checksums
956
+ [💎SHA_checksums]: https://gitlab.com/kettle-rb/json-merge/-/tree/main/checksums
957
+ [💎rlts]: https://github.com/rubocop-lts/rubocop-lts
958
+ [💎rlts-img]: https://img.shields.io/badge/code_style_&_linting-rubocop--lts-34495e.svg?plastic&logo=ruby&logoColor=white
959
+ [💎appraisal2]: https://github.com/appraisal-rb/appraisal2
960
+ [💎appraisal2-img]: https://img.shields.io/badge/appraised_by-appraisal2-34495e.svg?plastic&logo=ruby&logoColor=white
961
+ [💎d-in-dvcs]: https://railsbling.com/posts/dvcs/put_the_d_in_dvcs/
962
+
963
+ The `*-merge` gem family provides intelligent, AST-based merging for various file formats. At the foundation is [tree\_haver](https://github.com/kettle-rb/tree_haver), which provides a unified cross-Ruby parsing API that works seamlessly across MRI, JRuby, and TruffleRuby.
964
+
965
+ [ts-jsonc]: https://gitlab.com/WhyNotHugo/tree-sitter-jsonc
966
+ [dotenv]: https://github.com/bkeepers/dotenv