JsonPatcher
by MattiDragon
With JsonPatcher, a pack maker can change Minecraft's JSON files inside a datapack or resource pack without replacing them outright.
What it does
JsonPatcher is a library that edits JSON files in datapacks and resource packs by applying patches instead of overriding the original files. A patch is written in a small C-like syntax in a file with the .jsonpatch extension, placed in a jsonpatch directory inside the pack's data or assets folder. Developers and pack makers are the main audience, and players can use it to adjust their own packs.
The patch first selects its targets with a meta tag that follows JSON format. A single file can be chosen with a string, while broader selections use an object, and a set of several files can be given as an array. Each selector in the array matches the files that the patch will apply to. Once the target is chosen, the patch modifies its content, and the contents of the target can be read directly by name after a property is declared for it.
The mod requires Fabric API and runs on Fabric and Quilt. It is released under the MIT License and is open source, with public links to its source code, issue tracker and wiki. Files exist for 1.20.1, 1.20.2, 1.20.4, 1.20.6, 1.21 and 1.21.1, with snapshot builds also published. Either side can run it, and neither needs it.
Key features
Non-overriding patches
Changes are written as patches on top of existing JSON files, so the original content is kept and other packs can still apply their own edits.
Custom patch syntax
Patch files use a C-like domain-specific language for describing modifications to target files.
Selector-based targeting
Targets can be a single file, a broader selection, or an array of several selectors, and each selector is matched before the patch applies.
Property access in patches
The contents of a target file can be accessed by name after a property is declared, so patches can read values as well as write them.
Compatibility
Latest build for each game version and loader.
This mod also publishes snapshot builds. Snapshots are not shown in the matrix.
Requirements
Dependencies declared by the latest file for each loader.
Required 1
Required by 1 mod
Use cases
Pack making
Pack makers can alter vanilla or third-party JSON data without copying and replacing whole files.
Mod development
Developers who ship datapacks or resource packs can build patches into their projects as a library dependency.
Who it’s for: Mod developers and pack makers are the main audience. Players can use the patch format to modify the packs they own.
Questions
Does JsonPatcher need Fabric API?
Does the server need JsonPatcher?
Where do the patch files go?
In the catalog
JsonPatcher is one of 3,514 Library mods on ModsFinder, and one of 2,348 Library mods for Fabric. 32,366 mods support Minecraft 1.21.1.
More from MattiDragon
Similar mods
What the author says
JsonPatcher is a mod that allows you to modify json files in datapacks and resourcepacks without overriding them. This is primarily useful for mod developers and pack makers, but can also be used by players to modify their own packs. To begin using jsonpatcher, just create a file with the.jsonpatch extension in the…
Official listing
- Modrinth page
- modrinth.com/mod/jsonpatcher
- Owner
- MattiDragon
- Published
- 2023-11-13
- Updated on Modrinth
- 2025-09-24
- Facts verified
- 2026-10-15
