From fe31d31a1b3c755601f7c804daf5778718bca086 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Thu, 21 Jul 2022 08:48:02 +0200 Subject: [PATCH] fix up docs --- docs/mkdocs/docs/api/basic_json/patch.md | 1 + docs/mkdocs/docs/api/basic_json/patch_inplace.md | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/mkdocs/docs/api/basic_json/patch.md b/docs/mkdocs/docs/api/basic_json/patch.md index b3ef963f0..deec47434 100644 --- a/docs/mkdocs/docs/api/basic_json/patch.md +++ b/docs/mkdocs/docs/api/basic_json/patch.md @@ -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 diff --git a/docs/mkdocs/docs/api/basic_json/patch_inplace.md b/docs/mkdocs/docs/api/basic_json/patch_inplace.md index 1b95304d2..0b2055db2 100644 --- a/docs/mkdocs/docs/api/basic_json/patch_inplace.md +++ b/docs/mkdocs/docs/api/basic_json/patch_inplace.md @@ -1,4 +1,4 @@ -# nlohmann::basic_json::patch +# nlohmann::basic_json::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