Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
J

json-patch

> 编程语言
Open source

RFC 6902 (JSON Patch) / RFC 7396 (JSON Merge Patch) implementation for Rust

180 stars0 likes1 views
WebsiteGitHub

About

RFC 6902 (JSON Patch) / RFC 7396 (JSON Merge Patch) implementation for Rust

json-patch

A JSON Patch (RFC 6902) and JSON Merge Patch (RFC 7396) implementation for Rust.

Usage

Add this to your Cargo.toml:

toml
[dependencies]
json-patch = "*"

Examples

Create and patch document using JSON Patch:

rust
#[macro_use]
use json_patch::{Patch, patch};
use serde_json::{from_value, json};

let mut doc = json!([
    { "name": "Andrew" },
    { "name": "Maxim" }
]);

let p: Patch = from_value(json!([
  { "op": "test", "path": "/0/name", "value": "Andrew" },
  { "op": "add", "path": "/0/happy", "value": true }
])).unwrap();

patch(&mut doc, &p).unwrap();
assert_eq!(doc, json!([
  { "name": "Andrew", "happy": true },
  { "name": "Maxim" }
]));

Create and patch document using JSON Merge Patch:

…

License

Licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言