Skip to content

Commit 7421ac3

Browse files
authored
doc: Fix JSON Pointer example to use direct initialization (#4468)
Changed the example code in the documentation from copy initialization to direct initialization for `json::json_pointer`. This prevents compilation errors caused by the constructor being explicit.
1 parent 4b17f90 commit 7421ac3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/mkdocs/docs/features/json_pointer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Note `/` does not identify the root (i.e., the whole document), but an object en
4242
JSON Pointers can be created from a string:
4343

4444
```cpp
45-
json::json_pointer p = "/nested/one";
45+
json::json_pointer p("/nested/one");
4646
```
4747
4848
Furthermore, a user-defined string literal can be used to achieve the same result:

0 commit comments

Comments
 (0)