• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# <small>nlohmann::json_pointer::</small>operator/=
2
3```cpp
4// (1)
5json_pointer& operator/=(const json_pointer& ptr);
6
7// (2)
8json_pointer& operator/=(string_t token);
9
10// (3)
11json_pointer& operator/=(std::size_t array_idx)
12```
13
141. append another JSON pointer at the end of this JSON pointer
152. append an unescaped reference token at the end of this JSON pointer
163. append an array index at the end of this JSON pointer
17
18## Parameters
19
20`ptr` (in)
21:    JSON pointer to append
22
23`token` (in)
24:    reference token to append
25
26`array_idx` (in)
27:    array index to append
28
29## Return value
30
311. JSON pointer with `ptr` appended
322. JSON pointer with `token` appended without escaping `token`
333. JSON pointer with `array_idx` appended
34
35## Complexity
36
371. Linear in the length of `ptr`.
382. Amortized constant.
393. Amortized constant.
40
41## Examples
42
43??? example
44
45    The example shows the usage of `operator/=`.
46
47    ```cpp
48    --8<-- "examples/json_pointer__operator_add.cpp"
49    ```
50
51    Output:
52
53    ```json
54    --8<-- "examples/json_pointer__operator_add.output"
55    ```
56
57## Version history
58
591. Added in version 3.6.0.
602. Added in version 3.6.0. Changed type of `token` to `string_t` in version 3.11.0.
613. Added in version 3.6.0.
62