| Crates.io | diff_doc |
| lib.rs | diff_doc |
| version | 0.6.1 |
| created_at | 2025-10-27 13:28:25.234054+00 |
| updated_at | 2025-10-27 13:28:25.234054+00 |
| description | A document diffing library supporting multiple formats (JSON, YAML, XML, TOML). |
| homepage | |
| repository | https://github.com/vkrinitsyn/diff-doc-rs |
| max_upload_size | |
| id | 1902924 |
| size | 109,033 |
Create and restore diff mismatch from text or json file.
[!NOTE] Providing patch with minimal changes to list and map structure. In addition to the regular patch operations of insert, update, and delete, it includes swap and clone to reduce patch size.
Also support standard diff for text files.
The main goal is to provide Rust lib for a 3-way offline compare-apply for implement commutative style document change:
Base vs Document_A vs Document_B should provide Base doc with mixed change from A & B if no conflicts present.
[!IMPORTANT] Base + patch_A + patch_B = Base + patch_B + patch_A; if patch_A and patch_B are disjoint.
The implementation run in steps:
Notice: Array deletion must not have at index less than other patch array update, neither two different index's delete. Same apply for simplified plain text patch where line nimber use as index.