• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# <small>nlohmann::json_pointer::</small>to_string
2
3```cpp
4string_t to_string() const;
5```
6
7Return a string representation of the JSON pointer.
8
9## Return value
10
11A string representation of the JSON pointer
12
13## Notes
14
15For each JSON pointer `ptr`, it holds:
16
17```cpp
18ptr == json_pointer(ptr.to_string());
19```
20
21## Examples
22
23??? example
24
25    The example shows the result of `to_string`.
26
27    ```cpp
28    --8<-- "examples/json_pointer__to_string.cpp"
29    ```
30
31    Output:
32
33    ```json
34    --8<-- "examples/json_pointer__to_string.output"
35    ```
36
37## Version history
38
39- Since version 2.0.0.
40- Changed return type to `string_t` in version 3.11.0.
41