mirror of https://github.com/nlohmann/json.git
parent
09fb4819ff
commit
b185c5bc9d
|
@ -96,6 +96,7 @@ INSERT INTO searchIndex(name, type, path) VALUES ('parse_error', 'Class', 'api/b
|
|||
INSERT INTO searchIndex(name, type, path) VALUES ('parse_event_t', 'Enum', 'api/basic_json/parse_event_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('parser_callback_t', 'Type', 'api/basic_json/parser_callback_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('patch', 'Method', 'api/basic_json/patch/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('patch_inplace', 'Method', 'api/basic_json/patch_inplace/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('push_back', 'Method', 'api/basic_json/push_back/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('rbegin', 'Method', 'api/basic_json/rbegin/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('rend', 'Method', 'api/basic_json/rend/index.html');
|
||||
|
|
|
@ -256,6 +256,7 @@ Access to the JSON value
|
|||
### JSON Patch functions
|
||||
|
||||
- [**patch**](patch.md) - applies a JSON patch
|
||||
- [**patch_inplace**](patch_inplace.md) - applies a JSON patch in place
|
||||
- [**diff**](diff.md) (_static_) - creates a diff as a JSON patch
|
||||
|
||||
### JSON Merge Patch functions
|
||||
|
|
|
@ -5,7 +5,8 @@ void patch_inplace(const basic_json& json_patch) const;
|
|||
```
|
||||
|
||||
[JSON Patch](http://jsonpatch.com) defines a JSON document structure for expressing a sequence of operations to apply to
|
||||
a JSON document. With this function, a JSON Patch is applied to the current JSON value by executing all operations from the patch. This function applies a JSON patch in place and returns void.
|
||||
a JSON document. With this function, a JSON Patch is applied to the current JSON value by executing all operations from
|
||||
the patch. This function applies a JSON patch in place and returns void.
|
||||
|
||||
## Parameters
|
||||
|
||||
|
@ -37,7 +38,9 @@ affected by the patch, the complexity can usually be neglected.
|
|||
|
||||
## Notes
|
||||
|
||||
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.
|
||||
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
|
||||
|
||||
|
@ -61,3 +64,7 @@ Unlike [`patch`](patch.md), `patch_inplace` applies the operation "in place" and
|
|||
- [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
|
||||
|
||||
## Version history
|
||||
|
||||
- Added in version 3.11.0.
|
||||
|
|
|
@ -173,6 +173,7 @@ nav:
|
|||
- 'parse_event_t': api/basic_json/parse_event_t.md
|
||||
- 'parser_callback_t': api/basic_json/parser_callback_t.md
|
||||
- 'patch': api/basic_json/patch.md
|
||||
- 'patch_inplace': api/basic_json/patch_inplace.md
|
||||
- 'push_back': api/basic_json/push_back.md
|
||||
- 'rbegin': api/basic_json/rbegin.md
|
||||
- 'rend': api/basic_json/rend.md
|
||||
|
|
Loading…
Reference in New Issue