Let's assume we want to merge them in such way that the whole `address` document becomes a node of the `person`:
Let's assume we want to merge them in such way that the whole `address` document becomes a node of the `person`:
```
{ "person": {
"name": { "first": "Adam", "last": "Thomas" },
...
...
@@ -136,9 +136,9 @@ Let's assume we want to merge them in such way that the whole `address` document
}
```
The most important requirement to take care of document and value life-cycle as well as consistent memory managent using the right allocator during the value transfer.
The most important requirement to take care of document and value life-cycle as well as consistent memory managent using the right allocator during the value transfer.
* Simple yet most efficient way to achieve that is to modify the `address` definition above to initialize it with allocator of the `person` document, then we just add the root nenber of the value:
Simple yet most efficient way to achieve that is to modify the `address` definition above to initialize it with allocator of the `person` document, then we just add the root nenber of the value:
```
Documnet address(person.GetAllocator());
...
...
...
@@ -150,7 +150,7 @@ Alternatively, if we don't want to explicitly refer to the root value of `addres