fix up docs

This commit is contained in:
Wolf Vollprecht 2022-07-21 08:48:02 +02:00
parent fd62620005
commit fe31d31a1b
2 changed files with 4 additions and 6 deletions

View File

@ -65,6 +65,7 @@ is thrown. In any case, the original value is not changed: the patch is applied
- [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902)
- [RFC 6901 (JSON Pointer)](https://tools.ietf.org/html/rfc6901)
- [patch_inplace](patch_inplace.md) applies a JSON Patch without creating a copy of the document
- [merge_patch](merge_patch.md) applies a JSON Merge Patch
## Version history

View File

@ -1,4 +1,4 @@
# <small>nlohmann::basic_json::</small>patch
# <small>nlohmann::basic_json::</small>patch_inplace
```cpp
void patch_inplace(const basic_json& json_patch) const;
@ -12,10 +12,6 @@ a JSON document. With this function, a JSON Patch is applied to the current JSON
`json_patch` (in)
: JSON patch document
## Return value
void
## Exception safety
No guarantees, value may be corrupted by an unsuccessful patch operation.
@ -41,7 +37,7 @@ affected by the patch, the complexity can usually be neglected.
## Notes
Unlike `patch`, `patch_inplace` applies the operation "in place" and no copy of the json document is created. That makes it faster for large documents by avoiding the copy. However, the value of the json document might be corrupted if the function throws an exception.
Unlike [`patch`](patch.md), `patch_inplace` applies the operation "in place" and no copy of the JSON value is created. That makes it faster for large documents by avoiding the copy. However, the JSON value might be corrupted if the function throws an exception.
## Examples
@ -63,4 +59,5 @@ Unlike `patch`, `patch_inplace` applies the operation "in place" and no copy of
- [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902)
- [RFC 6901 (JSON Pointer)](https://tools.ietf.org/html/rfc6901)
- [patch](patch.md) applies a JSON Merge Patch
- [merge_patch](merge_patch.md) applies a JSON Merge Patch