This commit is contained in:
nlohmann
2026-10-06 05:24:20 +00:00
parent f99a460b9b
commit 41e21ac50a
315 changed files with 1334 additions and 616 deletions
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -7,7 +7,7 @@ static basic_json diff(const basic_json& source,
Creates a [JSON Patch](http://jsonpatch.com) so that value `source` can be changed into the value `target` by calling [`patch`](https://json.nlohmann.me/api/basic_json/patch/index.md) function.
For two JSON values `source` and `target`, the following code yields always `true`:
For two JSON values `source` and `target`, the following code always yields `true`:
```
source.patch(diff(source, target)) == target;
@@ -25,7 +25,7 @@ a JSON patch to convert the `source` to `target`
## Exception safety
Strong guarantee: if an exception is thrown, there are no changes in the JSON value.
Strong guarantee: `source` and `target` are never modified.
## Complexity